sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1762629 [6/15] - in /sis/trunk: ./ application/sis-console/src/main/java/org/apache/sis/console/ application/sis-console/src/test/java/org/apache/sis/console/ application/sis-openoffice/src/main/java/org/apache/sis/openoffice/ application/...
Date Wed, 28 Sep 2016 09:59:48 GMT
Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -391,7 +391,7 @@ public enum CommonCRS {
         this.southUTM   = southUTM;
         this.firstZone  = firstZone;
         this.lastZone   = lastZone;
-        cachedUTM = new HashMap<Integer,ProjectedCRS>();
+        cachedUTM = new HashMap<>();
     }
 
     /**
@@ -1572,7 +1572,7 @@ public enum CommonCRS {
      * Returns the same properties than the given object, except for the identifier which is set to the given code.
      */
     private static Map<String,?> properties(final IdentifiedObject template, final short code) {
-        final Map<String,Object> properties = new HashMap<String,Object>(IdentifiedObjects.getProperties(template, EXCLUDE));
+        final Map<String,Object> properties = new HashMap<>(IdentifiedObjects.getProperties(template, EXCLUDE));
         properties.put(GeographicCRS.IDENTIFIERS_KEY, new NamedIdentifier(Citations.EPSG, String.valueOf(code)));
         return properties;
     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -124,7 +124,7 @@ final class EPSGFactoryFallback extends
         final boolean geographic = type.isAssignableFrom(GeographicCRS.class);
         final boolean geocentric = type.isAssignableFrom(GeocentricCRS.class);
         final boolean projected  = type.isAssignableFrom(ProjectedCRS .class);
-        final Set<String> codes = new LinkedHashSet<String>();
+        final Set<String> codes = new LinkedHashSet<>();
         if (pm) codes.add(StandardDefinitions.GREENWICH);
         for (final CommonCRS crs : CommonCRS.values()) {
             if (ellipsoid)  add(codes, crs.ellipsoid);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/IdentifiedObjects.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -129,7 +129,7 @@ public final class IdentifiedObjects ext
      *         specified authority has been found.
      */
     public static Set<String> getNames(final IdentifiedObject object, final Citation authority) {
-        final Set<String> names = new LinkedHashSet<String>(8);
+        final Set<String> names = new LinkedHashSet<>(8);
         getName(object, authority, names);
         return names;
     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -40,7 +40,7 @@ import org.apache.sis.metadata.iso.Immut
 import org.apache.sis.util.ArgumentChecks;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/Properties.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -79,7 +79,7 @@ final class Properties extends AbstractM
      * The mapping from key names to the index expected by the {@link #getAt(IdentifiedObject, int)} method.
      * This map shall not be modified after construction (for multi-thread safety without synchronization).
      */
-    private static final Map<String,Integer> INDICES = new HashMap<String,Integer>(16);
+    private static final Map<String,Integer> INDICES = new HashMap<>(16);
     static {
         for (int i=0; i<KEYS.length; i++) {
             if (INDICES.put(KEYS[i], i) != null) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -101,7 +101,7 @@ final class StandardDefinitions {
      * @return The map of properties to give to constructors or factory methods.
      */
     private static Map<String,Object> properties(final int code, final String name, final String alias, final boolean world) {
-        final Map<String,Object> map = new HashMap<String,Object>(8);
+        final Map<String,Object> map = new HashMap<>(8);
         if (code != 0) {
             map.put(IDENTIFIERS_KEY, new NamedIdentifier(Citations.EPSG, String.valueOf(code)));
         }
@@ -242,7 +242,7 @@ final class StandardDefinitions {
      * If an other prime meridian is desired, the EPSG database shall be used.
      */
     static PrimeMeridian primeMeridian() {
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(NAME_KEY, new NamedIdentifier(Citations.EPSG, "Greenwich")); // Name is fixed by ISO 19111.
         properties.put(IDENTIFIERS_KEY, new NamedIdentifier(Citations.EPSG, GREENWICH));
         return new DefaultPrimeMeridian(properties, 0, NonSI.DEGREE_ANGLE);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/AbstractCRS.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -45,7 +45,7 @@ import static org.apache.sis.util.Argume
 import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -302,7 +302,7 @@ public class AbstractCRS extends Abstrac
     final AbstractCRS setCached(final AxesConvention convention, AbstractCRS crs) {
         assert Thread.holdsLock(this);
         if (forConvention == null) {
-            forConvention = new EnumMap<AxesConvention,AbstractCRS>(AxesConvention.class);
+            forConvention = new EnumMap<>(AxesConvention.class);
         } else if (crs != this) {
             for (final AbstractCRS existing : forConvention.values()) {
                 if (crs.equals(existing)) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultCompoundCRS.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -328,7 +328,7 @@ public class DefaultCompoundCRS extends
      * @see #getSingleComponents()
      */
     private boolean setSingleComponents(final List<? extends CoordinateReferenceSystem> crs) {
-        final List<SingleCRS> flattened = new ArrayList<SingleCRS>(crs.size());
+        final List<SingleCRS> flattened = new ArrayList<>(crs.size());
         final boolean identical = ReferencingUtilities.getSingleComponents(crs, flattened);
         singles = UnmodifiableArrayList.wrap(flattened.toArray(new SingleCRS[flattened.size()]));
         return identical;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultDerivedCRS.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -293,12 +293,12 @@ public class DefaultDerivedCRS extends A
     {
         if (baseCRS != null && derivedCS != null) {
             final String type = getType(baseCRS, derivedCS);
-            if (type != null) {
-                if (WKTKeywords.GeodeticCRS   .equals(type)) return new Geodetic  (properties, (GeodeticCRS)   baseCRS, conversion,                derivedCS);
-                if (WKTKeywords.VerticalCRS   .equals(type)) return new Vertical  (properties, (VerticalCRS)   baseCRS, conversion,   (VerticalCS) derivedCS);
-                if (WKTKeywords.TimeCRS       .equals(type)) return new Temporal  (properties, (TemporalCRS)   baseCRS, conversion,       (TimeCS) derivedCS);
-                if (WKTKeywords.ParametricCRS .equals(type)) return new Parametric(properties, (ParametricCRS) baseCRS, conversion, (DefaultParametricCS) derivedCS);
-                if (WKTKeywords.EngineeringCRS.equals(type)) {
+            if (type != null) switch (type) {
+                case WKTKeywords.GeodeticCRS:   return new Geodetic  (properties, (GeodeticCRS)   baseCRS, conversion,                derivedCS);
+                case WKTKeywords.VerticalCRS:   return new Vertical  (properties, (VerticalCRS)   baseCRS, conversion,   (VerticalCS) derivedCS);
+                case WKTKeywords.TimeCRS:       return new Temporal  (properties, (TemporalCRS)   baseCRS, conversion,       (TimeCS) derivedCS);
+                case WKTKeywords.ParametricCRS: return new Parametric(properties, (ParametricCRS) baseCRS, conversion, (DefaultParametricCS) derivedCS);
+                case WKTKeywords.EngineeringCRS: {
                     /*
                      * This case may happen for baseCRS of kind GeodeticCRS, ProjectedCRS or EngineeringCRS.
                      * But only the later is associated to EngineeringDatum; the two formers are associated
@@ -310,6 +310,7 @@ public class DefaultDerivedCRS extends A
                     if (baseCRS instanceof EngineeringCRS) {
                         return new Engineering(properties, (EngineeringCRS) baseCRS, conversion, derivedCS);
                     }
+                    break;
                 }
             }
         }
@@ -347,16 +348,17 @@ public class DefaultDerivedCRS extends A
     {
         if (baseCRS != null && derivedCS != null) {
             final String type = getType(baseCRS, derivedCS);
-            if (type != null) {
-                if (WKTKeywords.GeodeticCRS   .equals(type)) return new Geodetic  (properties, (GeodeticCRS)   baseCRS, interpolationCRS, method, baseToDerived,                derivedCS);
-                if (WKTKeywords.VerticalCRS   .equals(type)) return new Vertical  (properties, (VerticalCRS)   baseCRS, interpolationCRS, method, baseToDerived,   (VerticalCS) derivedCS);
-                if (WKTKeywords.TimeCRS       .equals(type)) return new Temporal  (properties, (TemporalCRS)   baseCRS, interpolationCRS, method, baseToDerived,       (TimeCS) derivedCS);
-                if (WKTKeywords.ParametricCRS .equals(type)) return new Parametric(properties, (ParametricCRS) baseCRS, interpolationCRS, method, baseToDerived, (DefaultParametricCS) derivedCS);
-                if (WKTKeywords.EngineeringCRS.equals(type)) {
+            if (type != null) switch (type) {
+                case WKTKeywords.GeodeticCRS:   return new Geodetic  (properties, (GeodeticCRS)   baseCRS, interpolationCRS, method, baseToDerived,                derivedCS);
+                case WKTKeywords.VerticalCRS:   return new Vertical  (properties, (VerticalCRS)   baseCRS, interpolationCRS, method, baseToDerived,  (VerticalCS)  derivedCS);
+                case WKTKeywords.TimeCRS:       return new Temporal  (properties, (TemporalCRS)   baseCRS, interpolationCRS, method, baseToDerived,      (TimeCS)  derivedCS);
+                case WKTKeywords.ParametricCRS: return new Parametric(properties, (ParametricCRS) baseCRS, interpolationCRS, method, baseToDerived, (DefaultParametricCS) derivedCS);
+                case WKTKeywords.EngineeringCRS: {
                     if (baseCRS instanceof EngineeringCRS) {
                         // See the comment in create(Map, SingleCRS, Conversion, CoordinateSystem)
                         return new Engineering(properties, (EngineeringCRS) baseCRS, interpolationCRS, method, baseToDerived, derivedCS);
                     }
+                    break;
                 }
             }
         }
@@ -378,12 +380,12 @@ public class DefaultDerivedCRS extends A
             return (DefaultDerivedCRS) object;
         } else {
             final String type = getType((SingleCRS) object.getBaseCRS(), object.getCoordinateSystem());
-            if (type != null) {
-                if (WKTKeywords.GeodeticCRS   .equals(type)) return new Geodetic   (object);
-                if (WKTKeywords.VerticalCRS   .equals(type)) return new Vertical   (object);
-                if (WKTKeywords.TimeCRS       .equals(type)) return new Temporal   (object);
-                if (WKTKeywords.ParametricCRS .equals(type)) return new Parametric (object);
-                if (WKTKeywords.EngineeringCRS.equals(type)) return new Engineering(object);
+            if (type != null) switch (type) {
+                case WKTKeywords.GeodeticCRS:    return new Geodetic   (object);
+                case WKTKeywords.VerticalCRS:    return new Vertical   (object);
+                case WKTKeywords.TimeCRS:        return new Temporal   (object);
+                case WKTKeywords.ParametricCRS:  return new Parametric (object);
+                case WKTKeywords.EngineeringCRS: return new Engineering(object);
             }
             return new DefaultDerivedCRS(object);
         }
@@ -594,10 +596,12 @@ public class DefaultDerivedCRS extends A
         if (longKeyword == null) {
             return null;
         }
-             if (longKeyword.equals(WKTKeywords.GeodeticCRS))    shortKeyword = WKTKeywords.GeodCRS;
-        else if (longKeyword.equals(WKTKeywords.VerticalCRS))    shortKeyword = WKTKeywords.VertCRS;
-        else if (longKeyword.equals(WKTKeywords.EngineeringCRS)) shortKeyword = WKTKeywords.EngCRS;
-        else return longKeyword;
+        switch (longKeyword) {
+            case WKTKeywords.GeodeticCRS:    shortKeyword = WKTKeywords.GeodCRS; break;
+            case WKTKeywords.VerticalCRS:    shortKeyword = WKTKeywords.VertCRS; break;
+            case WKTKeywords.EngineeringCRS: shortKeyword = WKTKeywords.EngCRS;  break;
+            default: return longKeyword;
+        }
         return formatter.shortOrLong(shortKeyword, longKeyword);
     }
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/crs/DefaultGeographicCRS.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -261,7 +261,7 @@ public class DefaultGeographicCRS extend
                 if (EPSG.equals(identifier.getCodeSpace())) try {
                     final int i = Arrays.binarySearch(EPSG_CODES, Short.parseShort(identifier.getCode()));
                     if (i >= 0) {
-                        final Map<String,Object> c = new HashMap<String,Object>(properties);
+                        final Map<String,Object> c = new HashMap<>(properties);
                         c.put(IDENTIFIERS_KEY, new ImmutableIdentifier(Citations.WMS, CRS, Short.toString(CRS_CODES[i])));
                         properties = c;
                     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -332,7 +332,7 @@ public class AbstractCS extends Abstract
     public synchronized AbstractCS forConvention(final AxesConvention convention) {
         ensureNonNull("convention", convention);
         if (derived == null) {
-            derived = new EnumMap<AxesConvention,AbstractCS>(AxesConvention.class);
+            derived = new EnumMap<>(AxesConvention.class);
         }
         AbstractCS cs = derived.get(convention);
         if (cs == null) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -40,7 +40,7 @@ import org.apache.sis.referencing.operat
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -71,7 +71,7 @@ import static org.apache.sis.util.collec
 import static org.apache.sis.internal.referencing.NilReferencingObject.UNNAMED;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -144,7 +144,7 @@ public class DefaultCoordinateSystemAxis
      *
      * @see #isHeuristicMatchForName(String)
      */
-    private static final Map<String,Object> ALIASES = new HashMap<String,Object>(12);
+    private static final Map<String,Object> ALIASES = new HashMap<>(12);
     static {
         final Boolean latitude  = Boolean.TRUE;
         final Boolean longitude = Boolean.FALSE;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/Normalizer.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -112,7 +112,7 @@ final class Normalizer implements Compar
      *
      * @see #order(AxisDirection)
      */
-    private static final Map<AxisDirection,Integer> ORDER = new HashMap<AxisDirection,Integer>();
+    private static final Map<AxisDirection,Integer> ORDER = new HashMap<>();
     static {
         final Map<AxisDirection,Integer> m = ORDER;
         // Get ordinal of last compass direction defined by GeoAPI. We will continue on the horizontal plane.
@@ -236,7 +236,7 @@ final class Normalizer implements Compar
         final String abbreviation = axis.getAbbreviation();
         final String newAbbr = sameDirection ? abbreviation :
                 AxisDirections.suggestAbbreviation(axis.getName().getCode(), newDir, newUnit);
-        final Map<String,Object> properties = new HashMap<String,Object>();
+        final Map<String,Object> properties = new HashMap<>();
         if (newAbbr.equals(abbreviation)) {
             properties.putAll(IdentifiedObjects.getProperties(axis, EXCLUDES));
         } else {
@@ -369,7 +369,7 @@ final class Normalizer implements Compar
                     min -= offset;
                     max -= offset;
                     if (min < max) { // Paranoiac check, but also a way to filter NaN values when offset is infinite.
-                        final Map<String,Object> properties = new HashMap<String,Object>();
+                        final Map<String,Object> properties = new HashMap<>();
                         properties.putAll(IdentifiedObjects.getProperties(axis, EXCLUDES));
                         properties.put(DefaultCoordinateSystemAxis.MINIMUM_VALUE_KEY, min);
                         properties.put(DefaultCoordinateSystemAxis.MAXIMUM_VALUE_KEY, max);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -44,7 +44,7 @@ import static org.apache.sis.util.Utilit
 import static org.apache.sis.util.collection.Containers.property;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/BursaWolfParameters.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -39,7 +39,7 @@ import static org.apache.sis.util.Argume
 import static org.apache.sis.referencing.operation.matrix.Matrix4.SIZE;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DatumShiftGrid.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -38,7 +38,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.measure.Units;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -50,7 +50,7 @@ import static org.apache.sis.util.Argume
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -52,7 +52,7 @@ import static org.apache.sis.util.Argume
 import static org.apache.sis.internal.referencing.WKTUtilities.toFormattable;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -418,7 +418,7 @@ public class DefaultGeodeticDatum extend
      */
     public Matrix getPositionVectorTransformation(final GeodeticDatum targetDatum, final Extent areaOfInterest) {
         ensureNonNull("targetDatum", targetDatum);
-        final ExtentSelector<BursaWolfParameters> selector = new ExtentSelector<BursaWolfParameters>(areaOfInterest);
+        final ExtentSelector<BursaWolfParameters> selector = new ExtentSelector<>(areaOfInterest);
         BursaWolfParameters candidate = select(targetDatum, selector);
         if (candidate != null) {
             return createTransformation(candidate, areaOfInterest);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -34,7 +34,7 @@ import org.apache.sis.util.ComparisonMod
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -43,7 +43,7 @@ import static org.apache.sis.util.Argume
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 import org.apache.sis.internal.referencing.Formulas;
 
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -37,7 +37,7 @@ import org.apache.sis.io.wkt.Formattable
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -36,7 +36,7 @@ import org.apache.sis.internal.metadata.
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -35,7 +35,7 @@ import org.apache.sis.internal.system.Lo
 import org.apache.sis.internal.metadata.NameMeaning;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryProxy.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -569,7 +569,7 @@ abstract class AuthorityFactoryProxy<T>
      */
     private static final Map<String, AuthorityFactoryProxy<?>> BY_URN_TYPE;
     static {
-        final Map<String, AuthorityFactoryProxy<?>> map = new HashMap<String, AuthorityFactoryProxy<?>>(14);
+        final Map<String, AuthorityFactoryProxy<?>> map = new HashMap<>(14);
         map.put("crs",                  CRS);
         map.put("datum",                DATUM);
         map.put("ellipsoid",            ELLIPSOID);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CacheRecord.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CacheRecord.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CacheRecord.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CacheRecord.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -102,7 +102,7 @@ final class CacheRecord implements Compa
      */
     @SuppressWarnings("UseOfSystemOutOrSystemErr")
     static void printCacheContent(final Map<?,?> cache, PrintWriter out) {
-        final List<CacheRecord> list = new ArrayList<CacheRecord>(cache.size() + 10);
+        final List<CacheRecord> list = new ArrayList<>(cache.size() + 10);
         int codeLength = 0;
         int identityLength = 0;
         for (final Map.Entry<?,?> entry : cache.entrySet()) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/CommonAuthorityFactory.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -209,7 +209,7 @@ public class CommonAuthorityFactory exte
      * @see #getCodeSpaces()
      */
     private static final Set<String> CODESPACES = Collections.unmodifiableSet(
-            new LinkedHashSet<String>(Arrays.asList(Constants.OGC, Constants.CRS, "AUTO", AUTO2)));
+            new LinkedHashSet<>(Arrays.asList(Constants.OGC, Constants.CRS, "AUTO", AUTO2)));
 
     /**
      * The bit for saying that a namespace is the legacy {@code "AUTO"} namespace.
@@ -262,7 +262,7 @@ public class CommonAuthorityFactory exte
      * Constructs a default factory for the {@code CRS} authority.
      */
     public CommonAuthorityFactory() {
-        codes = new LinkedHashMap<String,Class<?>>();
+        codes = new LinkedHashMap<>();
     }
 
     /**
@@ -291,7 +291,7 @@ public class CommonAuthorityFactory exte
     static String reformat(final String code) {
         try {
             return format(Integer.parseInt(code.substring(skipNamespace(code) & ~LEGACY_MASK)));
-        } catch (Exception e) {  // (NoSuchAuthorityCodeException | NumberFormatException) on the JDK7 branch.
+        } catch (NoSuchAuthorityCodeException | NumberFormatException e) {
             Logging.recoverableException(Logging.getLogger(Loggers.CRS_FACTORY), CommonAuthorityFactory.class, "reformat", e);
             return null;
         }
@@ -695,7 +695,7 @@ public class CommonAuthorityFactory exte
                     csFactory.createCoordinateSystemAxis(Collections.singletonMap(CartesianCS.NAME_KEY, "i"), "i", AxisDirection.EAST, NonSI.PIXEL),
                     csFactory.createCoordinateSystemAxis(Collections.singletonMap(CartesianCS.NAME_KEY, "j"), "j", AxisDirection.SOUTH, NonSI.PIXEL));
 
-            final Map<String,Object> properties = new HashMap<String,Object>(4);
+            final Map<String,Object> properties = new HashMap<>(4);
             properties.put(EngineeringDatum.NAME_KEY, cs.getName());
             properties.put(EngineeringDatum.ANCHOR_POINT_KEY, "Origin is in upper left.");
             displayCRS = DefaultFactories.forBuildin(CRSFactory.class).createEngineeringCRS(properties,

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactory.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -61,9 +61,7 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.util.resources.Messages;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.JDK7;
 import org.apache.sis.internal.jdk8.JDK8;
-import org.apache.sis.internal.jdk7.AutoCloseable;
 
 
 /**
@@ -103,16 +101,15 @@ import org.apache.sis.internal.jdk7.Auto
  * @version 0.7
  * @module
  */
-@AutoCloseable
 public abstract class ConcurrentAuthorityFactory<DAO extends GeodeticAuthorityFactory>
-        extends GeodeticAuthorityFactory
+        extends GeodeticAuthorityFactory implements AutoCloseable
 {
     /**
      * Duration of data access operations that should be logged, in nanoseconds.
      * Any operation that take longer than this amount of time to execute will have a message logged.
      * The log level depends on the execution duration as specified in {@link PerformanceLevel}.
      */
-    private static final long DURATION_FOR_LOGGING = 10000000L;       // 10 milliseconds.
+    private static final long DURATION_FOR_LOGGING = 10_000_000L;       // 10 milliseconds.
 
     /**
      * The authority, cached after first requested.
@@ -125,7 +122,7 @@ public abstract class ConcurrentAuthorit
      *
      * @see #isDefault(Class)
      */
-    private final Map<Class<?>,Boolean> inherited = new IdentityHashMap<Class<?>,Boolean>();
+    private final Map<Class<?>,Boolean> inherited = new IdentityHashMap<>();
 
     /**
      * The pool of cached objects.
@@ -138,7 +135,7 @@ public abstract class ConcurrentAuthorit
      *
      * <p>Every access to this pool must be synchronized on {@code findPool}.</p>
      */
-    private final Map<IdentifiedObject,FindEntry> findPool = new WeakHashMap<IdentifiedObject,FindEntry>();
+    private final Map<IdentifiedObject,FindEntry> findPool = new WeakHashMap<>();
 
     /**
      * Holds the reference to a Data Access Object used by {@link ConcurrentAuthorityFactory}, together with
@@ -202,14 +199,14 @@ public abstract class ConcurrentAuthorit
     /**
      * The Data Access Object in use by the current thread.
      */
-    private final ThreadLocal<DataAccessRef<DAO>> currentDAO = new ThreadLocal<DataAccessRef<DAO>>();
+    private final ThreadLocal<DataAccessRef<DAO>> currentDAO = new ThreadLocal<>();
 
     /**
      * The Data Access Object instances previously created and released for future reuse.
      * Last used factories must be {@linkplain Deque#addLast(Object) added last}.
      * This is used as a LIFO stack.
      */
-    private final Deque<DataAccessRef<DAO>> availableDAOs = new LinkedList<DataAccessRef<DAO>>();
+    private final Deque<DataAccessRef<DAO>> availableDAOs = new LinkedList<>();
 
     /**
      * The amount of Data Access Objects that can still be created. This number is decremented in a block
@@ -239,13 +236,13 @@ public abstract class ConcurrentAuthorit
      *
      * @see #getTimeout(TimeUnit)
      */
-    private long timeout = 60000000000L;     // 1 minute
+    private long timeout = 60_000_000_000L;     // 1 minute
 
     /**
      * The maximal difference between the scheduled time and the actual time in order to perform the factory disposal,
      * in nanoseconds. This is used as a tolerance value for possible wait time inaccuracy.
      */
-    static final long TIMEOUT_RESOLUTION = 200000000L;    // 0.2 second
+    static final long TIMEOUT_RESOLUTION = 200_000_000L;    // 0.2 second
 
     /**
      * Constructs an instance with a default number of threads and a default number of entries to keep
@@ -298,7 +295,7 @@ public abstract class ConcurrentAuthorit
          * error unless the above property has been set to 'true'.
          */
         remainingDAOs = maxConcurrentQueries;
-        cache = new Cache<Key,Object>(20, maxStrongReferences, false);
+        cache = new Cache<>(20, maxStrongReferences, false);
         cache.setKeyCollisionAllowed(true);
         /*
          * The shutdown hook serves two purposes:
@@ -309,7 +306,7 @@ public abstract class ConcurrentAuthorit
          *   2) Closes the Data Access Objects at JVM shutdown time if the application is standalone,
          *      or when the bundle is uninstalled if running inside an OSGi or Servlet container.
          */
-        Shutdown.register(new ShutdownHook<DAO>(this));
+        Shutdown.register(new ShutdownHook<>(this));
     }
 
     /**
@@ -397,7 +394,7 @@ public abstract class ConcurrentAuthorit
                         e.setUnavailableFactory(this);
                         throw e;
                     }
-                    usage = new DataAccessRef<DAO>(factory);
+                    usage = new DataAccessRef<>(factory);
                 }
                 assert usage.depth == 0 : usage;
                 usage.timestamp = System.nanoTime();
@@ -411,10 +408,7 @@ public abstract class ConcurrentAuthorit
                 synchronized (availableDAOs) {
                     remainingDAOs++;
                 }
-                if (e instanceof FactoryException) throw (FactoryException) e;
-                if (e instanceof RuntimeException) throw (RuntimeException) e;
-                if (e instanceof Error)            throw (Error) e;
-                throw new RuntimeException(e);  // Should never happen.
+                throw e;
             }
             currentDAO.set(usage);
         }
@@ -522,7 +516,7 @@ public abstract class ConcurrentAuthorit
             // Cancel closing for that factory.
             it.remove();
             synchronized (availableDAOs) {
-                recycle(new DataAccessRef<DAO>(factory));
+                recycle(new DataAccessRef<>(factory));
             }
         }
     }
@@ -556,7 +550,7 @@ public abstract class ConcurrentAuthorit
         final List<DAO> factories;
         final boolean isEmpty;
         synchronized (availableDAOs) {
-            factories = new ArrayList<DAO>(availableDAOs.size());
+            factories = new ArrayList<>(availableDAOs.size());
             final Iterator<DataAccessRef<DAO>> it = availableDAOs.iterator();
             final long nanoTime = System.nanoTime();
             while (it.hasNext()) {
@@ -2015,7 +2009,7 @@ public abstract class ConcurrentAuthorit
      */
     static <DAO extends GeodeticAuthorityFactory> List<DAO> clear(final Deque<DataAccessRef<DAO>> availableDAOs) {
         assert Thread.holdsLock(availableDAOs);
-        final List<DAO> factories = new ArrayList<DAO>(availableDAOs.size());
+        final List<DAO> factories = new ArrayList<>(availableDAOs.size());
         DataAccessRef<DAO> dao;
         while ((dao = availableDAOs.pollFirst()) != null) {
             factories.add(dao.factory);
@@ -2035,13 +2029,13 @@ public abstract class ConcurrentAuthorit
         Exception exception = null;
         for (int i=factories.size(); --i>=0;) {
             final DAO factory = factories.get(i);
-            if (JDK7.isAutoCloseable(factory)) try {
-                JDK7.close(factory);
+            if (factory instanceof AutoCloseable) try {
+                ((AutoCloseable) factory).close();
             } catch (Exception e) {
                 if (exception == null) {
                     exception = e;
                 } else {
-                    // exception.addSuppressed(e) on the JDK7 branch.
+                    exception.addSuppressed(e);
                 }
             }
         }
@@ -2064,6 +2058,7 @@ public abstract class ConcurrentAuthorit
      *
      * @throws FactoryException if an error occurred while closing the Data Access Objects.
      */
+    @Override
     public void close() throws FactoryException {
         try {
             final List<DAO> factories;
@@ -2100,7 +2095,7 @@ public abstract class ConcurrentAuthorit
                 return s;
             }
         }
-        return s + JDK7.lineSeparator() + usage;
+        return s + System.lineSeparator() + usage;
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/GeodeticObjectFactory.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -257,8 +257,8 @@ public class GeodeticObjectFactory exten
             properties = CollectionsExt.compact(new HashMap<String,Object>(properties));
         }
         defaultProperties = properties;
-        pool = new WeakHashSet<AbstractIdentifiedObject>(AbstractIdentifiedObject.class);
-        parser = new AtomicReference<Parser>();
+        pool = new WeakHashSet<>(AbstractIdentifiedObject.class);
+        parser = new AtomicReference<>();
     }
 
     /**
@@ -1637,7 +1637,7 @@ public class GeodeticObjectFactory exten
                 parserConstructor = c;
             }
             p = c.newInstance(defaultProperties, this, getMathTransformFactory());
-        } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
+        } catch (ReflectiveOperationException e) {
             throw new FactoryException(e);
         }
         final Object object;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -490,7 +490,7 @@ public class IdentifiedObjectFinder {
      * @see #createFromNames(IdentifiedObject)
      */
     Set<IdentifiedObject> createFromCodes(final IdentifiedObject object) throws FactoryException {
-        final Set<IdentifiedObject> result = new LinkedHashSet<IdentifiedObject>();     // We need to preserve order.
+        final Set<IdentifiedObject> result = new LinkedHashSet<>();     // We need to preserve order.
         for (final String code : getCodeCandidates(object)) {
             final IdentifiedObject candidate;
             try {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/IdentifiedObjectSet.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -44,8 +44,7 @@ import org.apache.sis.util.Localized;
 import org.apache.sis.util.Classes;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
-import org.apache.sis.internal.jdk7.JDK7;
+import java.util.Objects;
 import org.apache.sis.internal.jdk8.JDK8;
 
 
@@ -96,7 +95,7 @@ public class IdentifiedObjectSet<T exten
      * <p><b>Note:</b> using {@code ConcurrentHahMap} would be more efficient.
      * But the later does not support null values and does not preserve insertion order.</p>
      */
-    final Map<String,T> objects = new LinkedHashMap<String,T>();
+    final Map<String,T> objects = new LinkedHashMap<>();
 
     /**
      * The {@link #objects} keys, created for iteration purpose when first needed and cleared when the map is modified.
@@ -228,7 +227,7 @@ public class IdentifiedObjectSet<T exten
     public void setAuthorityCodes(final String... codes) {
         synchronized (objects) {
             this.codes = null;
-            final Map<String,T> copy = new HashMap<String,T>(objects);
+            final Map<String,T> copy = new HashMap<>(objects);
             objects.clear();
             for (final String code : codes) {
                 objects.put(code, copy.get(code));
@@ -566,7 +565,7 @@ public class IdentifiedObjectSet<T exten
      * Returns the message to format below the logging for giving the cause of an error.
      */
     private static String getCause(Throwable cause) {
-        final String lineSeparator = JDK7.lineSeparator();
+        final String lineSeparator = System.lineSeparator();
         final StringBuilder trace = new StringBuilder(180);
         while (cause != null) {
             trace.append(lineSeparator).append("  • ").append(Classes.getShortClassName(cause));

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -229,8 +229,8 @@ public class MultiAuthoritiesFactory ext
             else nullMask |= (1 << i);
         }
         providers = ArraysExt.resize(p, length);
-        factories = new ConcurrentHashMap<AuthorityFactoryIdentifier, AuthorityFactory>();
-        warnings  = new HashMap<AuthorityFactoryIdentifier, Boolean>();
+        factories = new ConcurrentHashMap<>();
+        warnings  = new HashMap<>();
         isIterationCompleted = new AtomicInteger(nullMask);
     }
 
@@ -310,13 +310,13 @@ public class MultiAuthoritiesFactory ext
                     private final Iterator<AuthorityFactory> factories = getAllFactories();
 
                     /** An iterator over the codes of the current factory. */
-                    private Iterator<String> codes = Collections.<String>emptySet().iterator();
+                    private Iterator<String> codes = Collections.emptyIterator();
 
                     /** The prefix to prepend before codes, or {@code null} if none. */
                     private String prefix;
 
                     /** For filtering duplicated codes when there is many versions of the same authority. */
-                    private final Set<String> done = new HashSet<String>();
+                    private final Set<String> done = new HashSet<>();
 
                     /** Tests if there is more codes to return. */
                     @Override public boolean hasNext() {
@@ -350,7 +350,7 @@ public class MultiAuthoritiesFactory ext
             /**
              * The cache of values returned by {@link #getAuthorityCodes(AuthorityFactory)}.
              */
-            private final Map<AuthorityFactory, Set<String>> cache = new IdentityHashMap<AuthorityFactory, Set<String>>();
+            private final Map<AuthorityFactory, Set<String>> cache = new IdentityHashMap<>();
 
             /**
              * Returns the authority codes for the given factory.
@@ -394,7 +394,7 @@ public class MultiAuthoritiesFactory ext
             public int size() {
                 if (size < 0) {
                     int n = 0;
-                    final Set<String> done = new HashSet<String>();
+                    final Set<String> done = new HashSet<>();
                     for (final Iterator<AuthorityFactory> it = getAllFactories(); it.hasNext();) {
                         final AuthorityFactory factory = it.next();
                         if (done.add(getCodeSpace(factory))) {
@@ -475,7 +475,7 @@ public class MultiAuthoritiesFactory ext
     public Set<String> getCodeSpaces() {
         Set<String> union = codeSpaces;
         if (union == null) {
-            union = new LinkedHashSet<String>();
+            union = new LinkedHashSet<>();
             for (final Iterator<AuthorityFactory> it = getAllFactories(); it.hasNext();) {
                 union.addAll(getCodeSpaces(it.next()));
             }
@@ -533,7 +533,7 @@ public class MultiAuthoritiesFactory ext
      * condition is meet, threads can safely use their iterators concurrently.</p>
      */
     final Iterator<AuthorityFactory> getAllFactories() {
-        return new LazySynchronizedIterator<AuthorityFactory>(providers);
+        return new LazySynchronizedIterator<>(providers);
     }
 
     /**
@@ -1556,8 +1556,8 @@ public class MultiAuthoritiesFactory ext
         @Override
         final Set<IdentifiedObject> createFromCodes(final IdentifiedObject object) throws FactoryException {
             if (finders == null) try {
-                final ArrayList<IdentifiedObjectFinder> list = new ArrayList<IdentifiedObjectFinder>();
-                final Map<AuthorityFactory,Boolean> unique = new IdentityHashMap<AuthorityFactory,Boolean>();
+                final ArrayList<IdentifiedObjectFinder> list = new ArrayList<>();
+                final Map<AuthorityFactory,Boolean> unique = new IdentityHashMap<>();
                 final Iterator<AuthorityFactory> it = ((MultiAuthoritiesFactory) factory).getAllFactories();
                 while (it.hasNext()) {
                     final AuthorityFactory candidate = it.next();
@@ -1574,7 +1574,7 @@ public class MultiAuthoritiesFactory ext
             } catch (BackingStoreException e) {
                 throw e.unwrapOrRethrow(FactoryException.class);
             }
-            final Set<IdentifiedObject> found = new LinkedHashSet<IdentifiedObject>();
+            final Set<IdentifiedObject> found = new LinkedHashSet<>();
             for (final IdentifiedObjectFinder finder : finders) {
                 found.addAll(finder.find(object));
             }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/AuthorityCodes.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/AuthorityCodes.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/AuthorityCodes.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/AuthorityCodes.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -190,7 +190,7 @@ final class AuthorityCodes extends Abstr
      * See class Javadoc for more information.
      */
     final CloseableReference<AuthorityCodes> createReference() {
-        return new CloseableReference<AuthorityCodes>(this, factory, statements);
+        return new CloseableReference<>(this, factory, statements);
     }
 
     /**
@@ -296,16 +296,13 @@ final class AuthorityCodes extends Abstr
                             sql[ONE] = null;    // Not needed anymore.
                         }
                         statement.setInt(1, n);
-                        final ResultSet results = statement.executeQuery();
-                        try {
+                        try (ResultSet results = statement.executeQuery()) {
                             while (results.next()) {
                                 String name = results.getString(1);
                                 if (name != null) {
                                     return name;
                                 }
                             }
-                        } finally {
-                            results.close();
                         }
                     }
                 }
@@ -382,7 +379,7 @@ final class AuthorityCodes extends Abstr
      * The serialized map of authority codes is disconnected from the underlying database.
      */
     protected Object writeReplace() throws ObjectStreamException {
-        return new LinkedHashMap<String,String>(this);
+        return new LinkedHashMap<>(this);
     }
 
     /*

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/AxisName.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/AxisName.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/AxisName.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/AxisName.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -16,7 +16,7 @@
  */
 package org.apache.sis.referencing.factory.sql;
 
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 import org.apache.sis.util.Debug;
 
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/BursaWolfInfo.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -199,12 +199,12 @@ final class BursaWolfInfo {
     static void filter(final GeodeticAuthorityFactory factory, final BursaWolfInfo[] candidates,
             final List<BursaWolfInfo> addTo) throws FactoryException
     {
-        final Map<Integer,ExtentSelector<BursaWolfInfo>> added = new LinkedHashMap<Integer,ExtentSelector<BursaWolfInfo>>();
+        final Map<Integer,ExtentSelector<BursaWolfInfo>> added = new LinkedHashMap<>();
         for (BursaWolfInfo candidate : candidates) {
             final Integer target = candidate.target;
             ExtentSelector<BursaWolfInfo> selector = added.get(target);
             if (selector == null) {
-                selector = new ExtentSelector<BursaWolfInfo>(null);
+                selector = new ExtentSelector<>(null);
                 added.put(target, selector);
             }
             selector.evaluate(candidate.getDomainOfValidity(factory), candidate);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CloseableReference.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CloseableReference.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CloseableReference.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CloseableReference.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -73,7 +73,7 @@ final class CloseableReference<T> extend
                     if (exception == null) {
                         exception = e;
                     } else {
-                        // exception.addSuppressed(e) on the JDK7 branch.
+                        exception.addSuppressed(e);
                     }
                 }
             }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CoordinateOperationSet.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CoordinateOperationSet.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CoordinateOperationSet.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/CoordinateOperationSet.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -49,7 +49,7 @@ final class CoordinateOperationSet exten
      */
     CoordinateOperationSet(final AuthorityFactory factory) {
         super(factory, CoordinateOperation.class);
-        projections = new HashMap<String,Integer>();
+        projections = new HashMap<>();
     }
 
     /**



Mime
View raw message