sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1762629 [5/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/internal/jaxb/referencing/CC_GeneralOperationParameter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralOperationParameter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralOperationParameter.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralOperationParameter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -259,7 +259,7 @@ public final class CC_GeneralOperationPa
          * by the 'complete' descriptor. If the descriptor is a group, then this 'replacement' method will
          * be invoked recursively for each parameter in the group.
          */
-        final Map<String,Object> merged = new HashMap<String,Object>(expected);
+        final Map<String,Object> merged = new HashMap<>(expected);
         merged.putAll(actual);  // May overwrite pre-defined properties.
         mergeArrays(GeneralParameterDescriptor.ALIAS_KEY,       GenericName.class, provided.getAlias(), merged, complete.getName());
         mergeArrays(GeneralParameterDescriptor.IDENTIFIERS_KEY, ReferenceIdentifier.class, provided.getIdentifiers(), merged, null);
@@ -299,8 +299,7 @@ public final class CC_GeneralOperationPa
                                           boolean                            canSubstitute)
     {
         boolean isCompatible = true;
-        final Set<GeneralParameterDescriptor> included =
-                new HashSet<GeneralParameterDescriptor>(Containers.hashMapCapacity(provided.length));
+        final Set<GeneralParameterDescriptor> included = new HashSet<>(Containers.hashMapCapacity(provided.length));
         for (int i=0; i<provided.length; i++) {
             final GeneralParameterDescriptor p = provided[i];
             try {
@@ -371,7 +370,7 @@ public final class CC_GeneralOperationPa
                                                      final ParameterDescriptor<T> complete)
     {
         final Class<T> valueClass = complete.getValueClass();
-        return new DefaultParameterDescriptor<T>(merged,
+        return new DefaultParameterDescriptor<>(merged,
                 provided.getMinimumOccurs(),
                 provided.getMaximumOccurs(),
                 // Values below this point are not provided in GML documents,
@@ -398,7 +397,7 @@ public final class CC_GeneralOperationPa
             if (size == 0) {
                 return false;
             }
-            final Set<NamedIdentifier> c = new HashSet<NamedIdentifier>(Containers.hashMapCapacity(size));
+            final Set<NamedIdentifier> c = new HashSet<>(Containers.hashMapCapacity(size));
             for (final T e : complete) {
                 c.add(toNamedIdentifier(e));
             }
@@ -434,7 +433,7 @@ public final class CC_GeneralOperationPa
                  *   2) Replace 'provided' instances by 'complete' instances, since the later
                  *      are sometime pre-defined instances defined as static final constants.
                  */
-                final Map<NamedIdentifier,T> c = new LinkedHashMap<NamedIdentifier,T>();
+                final Map<NamedIdentifier,T> c = new LinkedHashMap<>();
                 for (final T e : provided) c.put(toNamedIdentifier(e), e);
                 for (final T e : complete) c.put(toNamedIdentifier(e), e);
                 c.remove(toNamedIdentifier(remove));

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralParameterValue.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralParameterValue.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralParameterValue.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_GeneralParameterValue.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -87,7 +87,6 @@ public final class CC_GeneralParameterVa
         @XmlElement(name = "ParameterValue",      type = DefaultParameterValue.class),
         @XmlElement(name = "ParameterValueGroup", type = DefaultParameterValueGroup.class)
     })
-    @SuppressWarnings({"rawtypes", "unchecked"})
     public GeneralParameterValue getElement() {
         final GeneralParameterValue metadata = this.metadata;
         if (metadata instanceof DefaultParameterValue<?>) {
@@ -97,7 +96,7 @@ public final class CC_GeneralParameterVa
             return (DefaultParameterValueGroup) metadata;
         }
         if (metadata instanceof ParameterValue) {
-            return new DefaultParameterValue((ParameterValue<?>) metadata);
+            return new DefaultParameterValue<>((ParameterValue<?>) metadata);
         }
         if (metadata instanceof ParameterValueGroup) {
             return new DefaultParameterValueGroup((ParameterValueGroup) metadata);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationMethod.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationMethod.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationMethod.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationMethod.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -225,8 +225,7 @@ public final class CC_OperationMethod ex
             if (replacement != null) {
                 if (p instanceof ParameterValue<?>) {
                     final ParameterValue<?> source = (ParameterValue<?>) p;
-                    @SuppressWarnings({"unchecked", "rawtypes"})
-                    final ParameterValue<?> target = new DefaultParameterValue((ParameterDescriptor<?>) replacement);
+                    final ParameterValue<?> target = new DefaultParameterValue<>((ParameterDescriptor<?>) replacement);
                     final Object value = source.getValue();
                     final Unit<?> unit = source.getUnit();
                     if (unit == null) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameterGroup.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameterGroup.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameterGroup.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/jaxb/referencing/CC_OperationParameterGroup.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -145,7 +145,7 @@ public final class CC_OperationParameter
             return fromValues;
         }
         final Map<String,GeneralParameterDescriptor> union =
-                new LinkedHashMap<String,GeneralParameterDescriptor>(Containers.hashMapCapacity(descriptors.size()));
+                new LinkedHashMap<>(Containers.hashMapCapacity(descriptors.size()));
         /*
          * Collect the descriptors declared explicitely in the ParameterDescriptorGroup. We should never have
          * two descriptors of the same name since the DefaultParameterDescriptorGroup constructor checked for

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/MergedProperties.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -69,11 +69,11 @@ public class MergedProperties extends Ab
     @Override
     protected EntryIterator<String,Object> entryIterator() {
         if (merge == null) {
-            merge = new HashMap<String,Object>(defaultProperties);
+            merge = new HashMap<>(defaultProperties);
             merge.putAll(properties);
             merge.remove(null);
         }
-        return new IteratorAdapter<String,Object>(merge);    // That iterator will skip null values.
+        return new IteratorAdapter<>(merge);    // That iterator will skip null values.
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ReferencingUtilities.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -290,7 +290,7 @@ public final class ReferencingUtilities
                         }
                         name = CharSequences.trimWhitespaces(name, 0, i).toString();
                         if (!name.isEmpty()) {
-                            final Map<String,Object> copy = new HashMap<String,Object>(properties);
+                            final Map<String,Object> copy = new HashMap<>(properties);
                             copy.put(IdentifiedObject.NAME_KEY, name);
                             return copy;
                         }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/ServicesForMetadata.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -727,7 +727,7 @@ public final class ServicesForMetadata e
             }
             properties = Collections.emptyMap();
         }
-        final HashMap<String,Object> p = new HashMap<String,Object>(properties);
+        final HashMap<String,Object> p = new HashMap<>(properties);
         JDK8.putIfAbsent(p, CRS_FACTORY, crsFactory);
         JDK8.putIfAbsent(p, CS_FACTORY,  csFactory);
         properties = p;
@@ -795,12 +795,12 @@ public final class ServicesForMetadata e
      */
     @Override
     public String getInformation(final String key, final Locale locale) {
-        /*switch (key)*/ {
+        switch (key) {
             /*
              * Get the version of the EPSG database and the version of the database software.
              * This operation can be relatively costly as it may open a JDBC connection.
              */
-            if (key.equals(Constants.EPSG)) {
+            case Constants.EPSG: {
                 final Citation authority;
                 try {
                     authority = CRS.getAuthorityFactory(Constants.EPSG).getAuthority();

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/WKTUtilities.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -201,7 +201,6 @@ public final class WKTUtilities extends
      * @param parameter The parameter to append to the WKT, or {@code null} if none.
      * @param formatter The formatter where to append the parameter.
      */
-    @SuppressWarnings({"unchecked","rawtypes"})    // Not needed on JDK7 branch.
     public static void append(GeneralParameterValue parameter, final Formatter formatter) {
         if (parameter instanceof ParameterValueGroup) {
             boolean first = true;
@@ -215,7 +214,7 @@ public final class WKTUtilities extends
         }
         if (parameter instanceof ParameterValue<?>) {
             if (!(parameter instanceof FormattableObject)) {
-                parameter = new DefaultParameterValue((ParameterValue<?>) parameter);
+                parameter = new DefaultParameterValue<>((ParameterValue<?>) parameter);
             }
             formatter.append((FormattableObject) parameter);
             formatter.newLine();

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/AffineTransform2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/AffineTransform2D.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/AffineTransform2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/AffineTransform2D.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -55,7 +55,7 @@ import static org.apache.sis.util.Argume
  * @see ProjectiveTransform
  */
 public class AffineTransform2D extends ImmutableAffineTransform
-        implements MathTransform2D, LinearTransform, LenientComparable, Parameterized
+        implements LinearTransform2D, LenientComparable, Parameterized
 {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/ParameterizedAffine.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/ParameterizedAffine.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/ParameterizedAffine.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/ParameterizedAffine.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -16,15 +16,13 @@
  */
 package org.apache.sis.internal.referencing.j2d;
 
+import java.util.Objects;
 import java.awt.geom.AffineTransform;
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.referencing.operation.MathTransform;
 import org.apache.sis.internal.system.Semaphores;
 
-// Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
-
 
 /**
  * An affine transform that remember the parameters used for its construction.

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/AbstractProvider.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -94,7 +94,7 @@ public abstract class AbstractProvider e
     @Workaround(library="JDK", version="1.7")
     private static Map<String,Object> toMap(final IdentifiedObject parameters) {
         ArgumentChecks.ensureNonNull("parameters", parameters);
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(NAME_KEY, parameters.getName());
         final Collection<ReferenceIdentifier> identifiers = parameters.getIdentifiers();
         int size = identifiers.size();

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridCompressed.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridCompressed.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridCompressed.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridCompressed.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -116,7 +116,7 @@ final class DatumShiftGridCompressed<C e
             }
             data[dim] = compressed;
         }
-        return new DatumShiftGridCompressed<C,T>(grid, averages, data, scale);
+        return new DatumShiftGridCompressed<>(grid, averages, data, scale);
     }
 
     /**
@@ -124,7 +124,7 @@ final class DatumShiftGridCompressed<C e
      */
     @Override
     final DatumShiftGridFile<C,T> setData(final Object[] other) {
-        return new DatumShiftGridCompressed<C,T>(this, averages, (short[][]) other, scale);
+        return new DatumShiftGridCompressed<>(this, averages, (short[][]) other, scale);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridFile.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridFile.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridFile.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridFile.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -32,8 +32,7 @@ import org.apache.sis.referencing.datum.
 import org.apache.sis.internal.referencing.j2d.AffineTransform2D;
 
 // Branch-specific imports
-import java.io.File;
-import org.apache.sis.internal.jdk7.Path;
+import java.nio.file.Path;
 import org.apache.sis.internal.jdk8.JDK8;
 
 
@@ -201,7 +200,7 @@ public abstract class DatumShiftGridFile
         for (final GeneralParameterDescriptor gd : descriptor.descriptors()) {
             if (gd instanceof ParameterDescriptor<?>) {
                 final ParameterDescriptor<?> d = (ParameterDescriptor<?>) gd;
-                if (File.class.isAssignableFrom(d.getValueClass())) {
+                if (Path.class.isAssignableFrom(d.getValueClass())) {
                     parameters.getOrCreate(d).setValue(files[i]);
                     if (++i == files.length) break;
                 }
@@ -318,7 +317,7 @@ public abstract class DatumShiftGridFile
          */
         @Override
         final DatumShiftGridFile<C,T> setData(final Object[] other) {
-            return new Float<C,T>(this, (float[][]) other);
+            return new Float<>(this, (float[][]) other);
         }
 
         /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -31,8 +31,8 @@ import org.apache.sis.referencing.factor
 import org.apache.sis.referencing.factory.MissingFactoryResourceException;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Path;
-import java.io.FileNotFoundException;
+import java.nio.file.Path;
+import java.nio.file.NoSuchFileException;
 
 
 /**
@@ -160,7 +160,7 @@ class DatumShiftGridLoader {
      */
     static FactoryException canNotLoad(final String format, final Path file, final Exception cause) {
         final String message = Errors.format(Errors.Keys.CanNotParseFile_2, format, file);
-        if (cause instanceof FileNotFoundException) {
+        if (cause instanceof NoSuchFileException) {
             return new MissingFactoryResourceException(message, cause);
         } else {
             return new FactoryDataException(message, cause);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/EPSGName.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/EPSGName.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/EPSGName.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/EPSGName.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -114,7 +114,7 @@ public final class EPSGName {  // TODO:
      * @return A map of properties for building the operation method.
      */
     public static Map<String,Object> properties(final int identifier, final String name, final GenericName nameOGC) {
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(IDENTIFIERS_KEY, identifier(identifier));
         properties.put(NAME_KEY, create(name));
         if (nameOGC != null) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/FranceGeocentricInterpolation.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -56,9 +56,8 @@ import org.apache.sis.referencing.operat
 import static java.lang.Float.parseFloat;
 
 // Branch-specific imports
-import java.io.File;
-import org.apache.sis.internal.jdk7.Path;
-import org.apache.sis.internal.jdk7.Paths;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import org.apache.sis.internal.jdk8.JDK8;
 
 
@@ -143,7 +142,7 @@ public class FranceGeocentricInterpolati
     /**
      * The operation parameter descriptor for the <cite>Geocentric translation file</cite> parameter value.
      */
-    public static final ParameterDescriptor<File> FILE;
+    public static final ParameterDescriptor<Path> FILE;
 
     /**
      * The group of all parameters expected by this coordinate operation. The only parameter formally defined by EPSG
@@ -156,7 +155,7 @@ public class FranceGeocentricInterpolati
         FILE = builder
                 .addIdentifier("8727")
                 .addName("Geocentric translation file")
-                .setRemarks(NTv2.WARNING).create(File.class, Paths.get(DEFAULT));
+                .create(Path.class, Paths.get(DEFAULT));
         PARAMETERS = builder
                 .addIdentifier("9655")
                 .addName("France geocentric interpolation")
@@ -285,7 +284,7 @@ public class FranceGeocentricInterpolati
             default: throw new InvalidParameterValueException(Errors.format(
                             Errors.Keys.IllegalArgumentValue_2, "dim", dim), "dim", dim);
         }
-        final Path file = Path.castOrCopy(pg.getMandatoryValue(FILE));
+        final Path file = pg.getMandatoryValue(FILE);
         final DatumShiftGridFile<Angle,Length> grid = getOrLoad(file,
                 isRecognized(file) ? new double[] {TX, TY, TZ} : null, PRECISION);
         MathTransform tr = createGeodeticTransformation(factory,
@@ -334,16 +333,11 @@ public class FranceGeocentricInterpolati
             try {
                 grid = handler.peek();
                 if (grid == null) {
-                    try {
-                        final BufferedReader in = JDK8.newBufferedReader(resolved);
-                        try {
-                            DatumShiftGridLoader.log(FranceGeocentricInterpolation.class, file);
-                            final DatumShiftGridFile.Float<Angle,Length> g = load(in, file);
-                            grid = DatumShiftGridCompressed.compress(g, averages, scale);
-                        } finally {
-                            in.close();
-                        }
-                    } catch (Exception e) {     // Multi-catch on the JDK7 branch.
+                    try (final BufferedReader in = JDK8.newBufferedReader(resolved)) {
+                        DatumShiftGridLoader.log(FranceGeocentricInterpolation.class, file);
+                        final DatumShiftGridFile.Float<Angle,Length> g = load(in, file);
+                        grid = DatumShiftGridCompressed.compress(g, averages, scale);
+                    } catch (IOException | NoninvertibleTransformException | RuntimeException e) {
                         // NumberFormatException, ArithmeticException, NoSuchElementException, possibly other.
                         throw DatumShiftGridLoader.canNotLoad(HEADER, file, e);
                     }
@@ -423,7 +417,7 @@ public class FranceGeocentricInterpolati
                             Δy = gridGeometry[5];
                             nx = JDK8.toIntExact(Math.round((xf - x0) / Δx + 1));
                             ny = JDK8.toIntExact(Math.round((yf - y0) / Δy + 1));
-                            grid = new DatumShiftGridFile.Float<Angle,Length>(3,
+                            grid = new DatumShiftGridFile.Float<>(3,
                                     NonSI.DEGREE_ANGLE, SI.METRE, false,
                                     x0, y0, Δx, Δy, nx, ny, PARAMETERS, file);
                         }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/MapProjection.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -98,11 +98,11 @@ public abstract class MapProjection exte
             new NamedIdentifier(Citations.GEOTIFF, "SemiMajor"),
             new NamedIdentifier(Citations.PROJ4,   "a")
         };
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(AUTHORITY_KEY, Citations.OGC);
         properties.put(NAME_KEY,      Constants.SEMI_MAJOR);
         properties.put(ALIAS_KEY,     aliases);
-        SEMI_MAJOR = new DefaultParameterDescriptor<Double>(properties, 1, 1, Double.class, valueDomain, null, null);
+        SEMI_MAJOR = new DefaultParameterDescriptor<>(properties, 1, 1, Double.class, valueDomain, null, null);
         /*
          * Change in-place the name and aliases (we do not need to create new objects)
          * before to create the SEMI_MINOR descriptor.
@@ -112,14 +112,14 @@ public abstract class MapProjection exte
         aliases[1] = new NamedIdentifier(Citations.NETCDF,  "semi_minor_axis");
         aliases[2] = new NamedIdentifier(Citations.GEOTIFF, "SemiMinor");
         aliases[3] = new NamedIdentifier(Citations.PROJ4,   "b");
-        SEMI_MINOR = new DefaultParameterDescriptor<Double>(properties, 1, 1, Double.class, valueDomain, null, null);
+        SEMI_MINOR = new DefaultParameterDescriptor<>(properties, 1, 1, Double.class, valueDomain, null, null);
         /*
          * SIS-specific parameter for debugging purpose only.
          */
         properties.clear();
         properties.put(AUTHORITY_KEY, Citations.SIS);
         properties.put(NAME_KEY, "eccentricity");
-        ECCENTRICITY = new DefaultParameterDescriptor<Double>(properties, 1, 1, Double.class,
+        ECCENTRICITY = new DefaultParameterDescriptor<>(properties, 1, 1, Double.class,
                 MeasurementRange.create(0d, true, 1d, true, null), null, null);
     }
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/Molodensky.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -246,9 +246,7 @@ public final class Molodensky extends Ge
             if (value != null) {
                 return value;
             }
-        } catch (ParameterNotFoundException e) {
-            // Ignore - this is okay for this method contract.
-        } catch (IllegalStateException e) {
+        } catch (ParameterNotFoundException | IllegalStateException e) {
             // Ignore - this is okay for this method contract.
         }
         return Double.NaN;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NADCON.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NADCON.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NADCON.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NADCON.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -43,10 +43,9 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.internal.system.DataDirectory;
 
 // Branch-dependent imports
-import java.io.File;
-import org.apache.sis.internal.jdk7.Path;
-import org.apache.sis.internal.jdk7.Paths;
-import org.apache.sis.internal.jdk7.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.Files;
 
 
 /**
@@ -76,13 +75,13 @@ public final class NADCON extends Abstra
      * The operation parameter descriptor for the <cite>"Latitude difference file"</cite> parameter value.
      * The default value is {@code "conus.las"}.
      */
-    private static final ParameterDescriptor<File> LATITUDE;
+    private static final ParameterDescriptor<Path> LATITUDE;
 
     /**
      * The operation parameter descriptor for the <cite>"Longitude difference file"</cite> parameter value.
      * The default value is {@code "conus.los"}.
      */
-    private static final ParameterDescriptor<File> LONGITUDE;
+    private static final ParameterDescriptor<Path> LONGITUDE;
 
     /**
      * The group of all parameters expected by this coordinate operation.
@@ -93,11 +92,11 @@ public final class NADCON extends Abstra
         LATITUDE = builder
                 .addIdentifier("8657")
                 .addName("Latitude difference file")
-                .setRemarks(NTv2.WARNING).create(File.class, Paths.get("conus.las"));
+                .create(Path.class, Paths.get("conus.las"));
         LONGITUDE = builder
                 .addIdentifier("8658")
                 .addName("Longitude difference file")
-                .setRemarks(NTv2.WARNING).create(File.class, Paths.get("conus.los"));
+                .create(Path.class, Paths.get("conus.los"));
         PARAMETERS = builder
                 .addIdentifier("9613")
                 .addName("NADCON")
@@ -136,8 +135,7 @@ public final class NADCON extends Abstra
     {
         final Parameters pg  = Parameters.castOrWrap(values);
         return InterpolatedTransform.createGeodeticTransformation(factory,
-                getOrLoad(Path.castOrCopy(pg.getMandatoryValue(LATITUDE)),
-                          Path.castOrCopy(pg.getMandatoryValue(LONGITUDE))));
+                getOrLoad(pg.getMandatoryValue(LATITUDE), pg.getMandatoryValue(LONGITUDE)));
     }
 
     /**
@@ -153,7 +151,7 @@ public final class NADCON extends Abstra
     {
         final Path rlat = DataDirectory.DATUM_CHANGES.resolve(latitudeShifts).toAbsolutePath();
         final Path rlon = DataDirectory.DATUM_CHANGES.resolve(longitudeShifts).toAbsolutePath();
-        final Object key = new AbstractMap.SimpleImmutableEntry<Path,Path>(rlat, rlon);
+        final Object key = new AbstractMap.SimpleImmutableEntry<>(rlat, rlon);
         DatumShiftGridFile<?,?> grid = DatumShiftGridFile.CACHE.peek(key);
         if (grid == null) {
             final Cache.Handler<DatumShiftGridFile<?,?>> handler = DatumShiftGridFile.CACHE.lock(key);
@@ -166,24 +164,18 @@ public final class NADCON extends Abstra
                         // Note: buffer size must be divisible by the size of 'float' data type.
                         final ByteBuffer buffer = ByteBuffer.allocate(4096).order(ByteOrder.LITTLE_ENDIAN);
                         final FloatBuffer fb = buffer.asFloatBuffer();
-                        ReadableByteChannel in = Files.newByteChannel(rlat);
-                        try {
+                        try (final ReadableByteChannel in = Files.newByteChannel(rlat)) {
                             DatumShiftGridLoader.log(NADCON.class, CharSequences.commonPrefix(
                                     latitudeShifts.toString(), longitudeShifts.toString()).toString() + '…');
                             loader = new Loader(in, buffer, file);
                             loader.readGrid(fb, null, longitudeShifts);
-                        } finally {
-                            in.close();
                         }
                         buffer.clear();
                         file = longitudeShifts;
-                        in = Files.newByteChannel(rlon);
-                        try {
+                        try (final ReadableByteChannel in = Files.newByteChannel(rlon)) {
                             new Loader(in, buffer, file).readGrid(fb, loader, null);
-                        } finally {
-                            in.close();
                         }
-                    } catch (Exception e) {     // Multi-catch on the JDK7 branch.
+                    } catch (IOException | NoninvertibleTransformException | RuntimeException e) {
                         throw DatumShiftGridLoader.canNotLoad("NADCON", file, e);
                     }
                     grid = DatumShiftGridCompressed.compress(loader.grid, null, loader.grid.accuracy);
@@ -400,7 +392,7 @@ public final class NADCON extends Abstra
             if (latitudeShifts == null) {
                 dim   = 1;                          // Dimension of latitudes.
                 scale = DEGREES_TO_SECONDS * Δy;    // NADCON shifts are positive north.
-                grid  = new DatumShiftGridFile.Float<Angle,Angle>(2, NonSI.DEGREE_ANGLE, NonSI.DEGREE_ANGLE,
+                grid  = new DatumShiftGridFile.Float<>(2, NonSI.DEGREE_ANGLE, NonSI.DEGREE_ANGLE,
                         true, x0, y0, Δx, Δy, nx, ny, PARAMETERS, file, longitudeShifts);
                 grid.accuracy = SECOND_PRECISION / DEGREES_TO_SECONDS;
             } else {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NTv2.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NTv2.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NTv2.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/NTv2.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -51,12 +51,9 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.util.resources.Messages;
 
 // Branch-dependent imports
-import java.io.File;
-import org.opengis.util.InternationalString;
-import org.apache.sis.util.iso.SimpleInternationalString;
-import org.apache.sis.internal.jdk7.Files;
-import org.apache.sis.internal.jdk7.Path;
-import org.apache.sis.internal.jdk7.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.charset.StandardCharsets;
 import org.apache.sis.internal.jdk8.JDK8;
 
 
@@ -78,18 +75,10 @@ public final class NTv2 extends Abstract
     private static final long serialVersionUID = -4027618007780159180L;
 
     /**
-     * Warns the user that the parameter type will change from {@link File}
-     * to {@link java.nio.file.Path} when Apache SIS will upgrade to Java 7.
-     */
-    static final InternationalString WARNING = new SimpleInternationalString(
-            "The parameter type will change from ‘java.io.File’ to ‘java.nio.file.Path’ " +
-            "when Apache SIS will upgrade to Java 7.");
-
-    /**
      * The operation parameter descriptor for the <cite>"Latitude and longitude difference file"</cite> parameter value.
      * The file extension is typically {@code ".gsb"}. There is no default value.
      */
-    private static final ParameterDescriptor<File> FILE;
+    private static final ParameterDescriptor<Path> FILE;
 
     /**
      * The group of all parameters expected by this coordinate operation.
@@ -100,7 +89,7 @@ public final class NTv2 extends Abstract
         FILE = builder
                 .addIdentifier("8656")
                 .addName("Latitude and longitude difference file")
-                .setRemarks(WARNING).create(File.class, null);
+                .create(Path.class, null);
         PARAMETERS = builder
                 .addIdentifier("9615")
                 .addName("NTv2")
@@ -138,8 +127,7 @@ public final class NTv2 extends Abstract
             throws ParameterNotFoundException, FactoryException
     {
         final Parameters pg = Parameters.castOrWrap(values);
-        return InterpolatedTransform.createGeodeticTransformation(factory,
-                getOrLoad(Path.castOrCopy(pg.getMandatoryValue(FILE))));
+        return InterpolatedTransform.createGeodeticTransformation(factory, getOrLoad(pg.getMandatoryValue(FILE)));
     }
 
     /**
@@ -157,17 +145,12 @@ public final class NTv2 extends Abstract
             try {
                 grid = handler.peek();
                 if (grid == null) {
-                    try {
-                        final ReadableByteChannel in = Files.newByteChannel(resolved);
-                        try {
-                            DatumShiftGridLoader.log(NTv2.class, file);
-                            final Loader loader = new Loader(in, file);
-                            grid = loader.readGrid();
-                            loader.reportWarnings();
-                        } finally {
-                            in.close();
-                        }
-                    } catch (Exception e) {     // Multi-catch on the JDK7 branch.
+                    try (final ReadableByteChannel in = Files.newByteChannel(resolved)) {
+                        DatumShiftGridLoader.log(NTv2.class, file);
+                        final Loader loader = new Loader(in, file);
+                        grid = loader.readGrid();
+                        loader.reportWarnings();
+                    } catch (IOException | NoninvertibleTransformException | RuntimeException e) {
                         throw DatumShiftGridLoader.canNotLoad("NTv2", file, e);
                     }
                     grid = grid.useSharedData();
@@ -213,7 +196,7 @@ public final class NTv2 extends Abstract
          */
         private static final Map<String,Integer> TYPES;
         static {
-            final Map<String,Integer> types = new HashMap<String,Integer>(32);
+            final Map<String,Integer> types = new HashMap<>(32);
             final Integer string  = STRING_TYPE;    // Autoboxing
             final Integer integer = INTEGER_TYPE;
             final Integer real    = DOUBLE_TYPE;
@@ -271,7 +254,7 @@ public final class NTv2 extends Abstract
          */
         Loader(final ReadableByteChannel channel, final Path file) throws IOException, FactoryException {
             super(channel, ByteBuffer.allocate(4096), file);
-            this.header = new LinkedHashMap<String,Object>();
+            this.header = new LinkedHashMap<>();
             ensureBufferContains(RECORD_LENGTH);
             if (isLittleEndian(buffer.getInt(KEY_LENGTH))) {
                 buffer.order(ByteOrder.LITTLE_ENDIAN);
@@ -348,7 +331,7 @@ public final class NTv2 extends Abstract
              * sign of longitude translations; instead, this reversal will be handled by grid.coordinateToGrid
              * MathTransform and its inverse.
              */
-            final DatumShiftGridFile.Float<Angle,Angle> grid = new DatumShiftGridFile.Float<Angle,Angle>(2,
+            final DatumShiftGridFile.Float<Angle,Angle> grid = new DatumShiftGridFile.Float<>(2,
                     unit, unit, true, -xmin, ymin, -dx, dy, width, height, PARAMETERS, file);
             @SuppressWarnings("MismatchedReadAndWriteOfArray") final float[] tx = grid.offsets[0];
             @SuppressWarnings("MismatchedReadAndWriteOfArray") final float[] ty = grid.offsets[1];

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/AbstractParameterDescriptor.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -34,6 +34,7 @@ import org.apache.sis.util.Debug;
 
 import static org.apache.sis.internal.jaxb.referencing.CC_GeneralOperationParameter.DEFAULT_OCCURRENCE;
 
+
 /**
  * Abstract definition of a parameter or group of parameters used by a coordinate operation or a process.
  * This interface combines information provided by Referencing by Coordinates (ISO 19111),
@@ -311,7 +312,6 @@ public abstract class AbstractParameterD
      * @return {@code "Parameter"} or {@code "ParameterGroup"}.
      */
     @Override
-    @SuppressWarnings({"unchecked","rawtypes"})
     protected String formatTo(final Formatter formatter) {
         super.formatTo(formatter);
         formatter.setInvalidWKT(this, null);
@@ -319,7 +319,7 @@ public abstract class AbstractParameterD
             for (GeneralParameterDescriptor parameter : ((ParameterDescriptorGroup) this).descriptors()) {
                 if (!(parameter instanceof FormattableObject)) {
                     if (parameter instanceof ParameterDescriptor<?>) {
-                        parameter = new DefaultParameterDescriptor((ParameterDescriptor<?>) parameter);
+                        parameter = new DefaultParameterDescriptor<>((ParameterDescriptor<?>) parameter);
                     } else if (parameter instanceof ParameterDescriptorGroup) {
                         parameter = new DefaultParameterDescriptorGroup((ParameterDescriptorGroup) parameter);
                     } else {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptor.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -42,7 +42,7 @@ import static org.apache.sis.util.Argume
 import static org.apache.sis.util.ArgumentChecks.ensureCanCast;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -290,7 +290,7 @@ public class DefaultParameterDescriptor<
      */
     public static <T> DefaultParameterDescriptor<T> castOrCopy(final ParameterDescriptor<T> object) {
         return (object == null) || (object instanceof DefaultParameterDescriptor<?>)
-                ? (DefaultParameterDescriptor<T>) object : new DefaultParameterDescriptor<T>(object);
+                ? (DefaultParameterDescriptor<T>) object : new DefaultParameterDescriptor<>(object);
     }
 
     /**
@@ -432,7 +432,7 @@ public class DefaultParameterDescriptor<
      */
     @Override
     public ParameterValue<T> createValue() {
-        return new DefaultParameterValue<T>(this);
+        return new DefaultParameterValue<>(this);
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -279,7 +279,7 @@ public class DefaultParameterDescriptorG
         @Override public boolean contains(final Object object) {
             Set<GeneralParameterDescriptor> s = asSet;
             if (s == null) {
-                asSet = s = new HashSet<GeneralParameterDescriptor>(this); // No synchronization: not a big problem if created twice.
+                asSet = s = new HashSet<>(this); // No synchronization: not a big problem if created twice.
             }
             return s.contains(object);
         }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValue.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -57,7 +57,8 @@ import static org.apache.sis.util.Argume
 import static org.apache.sis.util.Utilities.deepEquals;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
+import java.nio.file.Path;
 
 
 /**
@@ -470,7 +471,7 @@ public class DefaultParameterValue<T> ex
     /**
      * Returns a reference to a file or a part of a file containing one or more parameter values.
      * The default implementation can convert the following value types:
-     * {@link URI}, {@link URL}, {@link File}.
+     * {@link URI}, {@link URL}, {@link Path}, {@link File}.
      *
      * @return The reference to a file containing parameter values.
      * @throws InvalidParameterTypeException if the value is not a reference to a file or an URI.
@@ -488,6 +489,9 @@ public class DefaultParameterValue<T> ex
         if (value instanceof File) {
             return ((File) value).toURI();
         }
+        if (value instanceof Path) {
+            return ((Path) value).toUri();
+        }
         Exception cause = null;
         try {
             if (value instanceof URL) {
@@ -507,7 +511,7 @@ public class DefaultParameterValue<T> ex
      * Returns {@code true} if the given value is an instance of one of the types documented in {@link #valueFile()}.
      */
     private static boolean isFile(final Object value) {
-        return (value instanceof URI || value instanceof URL || value instanceof File);
+        return (value instanceof URI || value instanceof URL || value instanceof File || value instanceof Path);
     }
 
     /**
@@ -518,6 +522,7 @@ public class DefaultParameterValue<T> ex
         if (value instanceof String) {
             final Class<?> type = descriptor.getValueClass();
             return (type == URI.class) || (type == URL.class)
+                   || Path.class.isAssignableFrom(type)
                    || File.class.isAssignableFrom(type);
         }
         return isFile(value);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterValueGroup.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -43,7 +43,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.Utilities;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -340,7 +340,7 @@ public class DefaultParameterValueGroup
     public List<ParameterValueGroup> groups(final String name) throws ParameterNotFoundException {
         ArgumentChecks.ensureNonNull("name", name);
         final ParameterValueList values = this.values; // Protect against accidental changes.
-        final List<ParameterValueGroup> groups = new ArrayList<ParameterValueGroup>(4);
+        final List<ParameterValueGroup> groups = new ArrayList<>(4);
         final int size = values.size();
         for (int i=0; i<size; i++) {
             final GeneralParameterDescriptor descriptor = values.descriptor(i);
@@ -443,7 +443,7 @@ public class DefaultParameterValueGroup
         if (!mode.isIgnoringMetadata()) {
             return Utilities.deepEquals(expected.values(), actual.values(), mode);
         }
-        final List<GeneralParameterValue> values = new LinkedList<GeneralParameterValue>(expected.values());
+        final List<GeneralParameterValue> values = new LinkedList<>(expected.values());
 scan:   for (final GeneralParameterValue param : actual.values()) {
             final Iterator<GeneralParameterValue> it = values.iterator();
             while (it.hasNext()) {
@@ -567,8 +567,7 @@ scan:   for (final GeneralParameterValue
          * <gml:parameterValue> element. The implementation is known to be DefaultParameterDescriptorGroup
          * because this is the type declared in the JAXBContext and in adapters.
          */
-        final Map<GeneralParameterDescriptor,GeneralParameterDescriptor> replacements =
-                new IdentityHashMap<GeneralParameterDescriptor,GeneralParameterDescriptor>(4);
+        final Map<GeneralParameterDescriptor,GeneralParameterDescriptor> replacements = new IdentityHashMap<>(4);
         ((DefaultParameterDescriptorGroup) addTo.descriptor).merge(getDescriptors(parameters), replacements);
         addTo.clear();  // Because references to parameter descriptors have changed.
         setValues(parameters, replacements, addTo);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -75,14 +75,16 @@ final class MapProjectionDescriptor exte
         boolean hasP1 = false;
         boolean hasP2 = false;
         for (final ParameterDescriptor<?> param : parameters) {
-            String code = param.getName().getCode();
-            if (code.equals(Constants.STANDARD_PARALLEL_1)) hasP1 = true;
-            else if (code.equals(Constants.STANDARD_PARALLEL_2)) hasP2 = true;
-            else {
-                for (final GenericName alias : param.getAlias()) {
-                    code = alias.tip().toString();
-                    if (code.equals(Constants.STANDARD_PARALLEL_1)) hasP1 = true;
-                    else if (code.equals(Constants.STANDARD_PARALLEL_2)) hasP2 = true;
+            switch (param.getName().getCode()) {
+                case Constants.STANDARD_PARALLEL_1: hasP1 = true; break;
+                case Constants.STANDARD_PARALLEL_2: hasP2 = true; break;
+                default: {
+                    for (final GenericName alias : param.getAlias()) {
+                        switch (alias.tip().toString()) {
+                            case Constants.STANDARD_PARALLEL_1: hasP1 = true; break;
+                            case Constants.STANDARD_PARALLEL_2: hasP2 = true; break;
+                        }
+                    }
                 }
             }
             if (hasP1 & hasP2) break;

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -34,7 +34,7 @@ import static org.opengis.referencing.Id
 import static org.apache.sis.metadata.iso.citation.Citations.NETCDF;
 
 // Branch-specific imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -168,7 +168,7 @@ final class MapProjectionParameters exte
          * This is used in some NetCDF files instead of {@code SEMI_MAJOR} and {@code SEMI_MINOR}.
          * This is not a standard parameter.
          */
-        static final ParameterDescriptor<Double> DESCRIPTOR = new DefaultParameterDescriptor<Double>(
+        static final ParameterDescriptor<Double> DESCRIPTOR = new DefaultParameterDescriptor<>(
                 InverseFlattening.toMap(Constants.EARTH_RADIUS), 0, 1, Double.class,
                 MeasurementRange.createGreaterThan(0.0, SI.METRE), null, null);
 
@@ -252,7 +252,7 @@ final class MapProjectionParameters exte
          * This is used in some NetCDF files instead of {@code SEMI_MINOR}.
          * This is not a standard parameter.
          */
-        static final ParameterDescriptor<Double> DESCRIPTOR = new DefaultParameterDescriptor<Double>(
+        static final ParameterDescriptor<Double> DESCRIPTOR = new DefaultParameterDescriptor<>(
                 toMap(Constants.INVERSE_FLATTENING), 0, 1, Double.class,
                 MeasurementRange.createGreaterThan(0.0, Unit.ONE), null, null);
 
@@ -370,7 +370,7 @@ final class MapProjectionParameters exte
          * All names known to Apache SIS for the "is IVF definitive" parameter.
          * This is not a standard parameter.
          */
-        static final ParameterDescriptor<Boolean> DESCRIPTOR = new DefaultParameterDescriptor<Boolean>(
+        static final ParameterDescriptor<Boolean> DESCRIPTOR = new DefaultParameterDescriptor<>(
                 InverseFlattening.toMap(Constants.IS_IVF_DEFINITIVE), 0, 1, Boolean.class, null, null, Boolean.FALSE);
 
         /**
@@ -434,7 +434,7 @@ final class MapProjectionParameters exte
          * This is used in some NetCDF files instead of {@link #STANDARD_PARALLEL_1} and
          * {@link #STANDARD_PARALLEL_2}. This is not a standard parameter.
          */
-        static final ParameterDescriptor<double[]> DESCRIPTOR = new DefaultParameterDescriptor<double[]>(
+        static final ParameterDescriptor<double[]> DESCRIPTOR = new DefaultParameterDescriptor<>(
                 InverseFlattening.toMap(Constants.STANDARD_PARALLEL),
                 0, 1, double[].class, null, null, null);
 

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParameters.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -67,7 +67,6 @@ class MatrixParameters extends TensorPar
      * @param numRow The parameter for the number of rows.
      * @param numCol The parameter for the number of columns.
      */
-    @SuppressWarnings("unchecked")
     MatrixParameters(final ParameterDescriptor<Integer> numRow, final ParameterDescriptor<Integer> numCol) {
         super(Double.class, "elt_", "_", numRow, numCol);
     }
@@ -155,7 +154,7 @@ class MatrixParameters extends TensorPar
      */
     @Override
     protected ParameterDescriptor<Double> createElementDescriptor(final int[] indices) throws IllegalArgumentException {
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(ParameterDescriptor.NAME_KEY,
                 new NamedIdentifier(Citations.OGC, Constants.OGC, indicesToName(indices), null, null));
         final String c = indicesToAlias(indices);
@@ -163,7 +162,7 @@ class MatrixParameters extends TensorPar
             properties.put(ParameterDescriptor.ALIAS_KEY,
                     new NamedIdentifier(Citations.SIS, Constants.SIS, c, null, null));
         }
-        return new DefaultParameterDescriptor<Double>(properties, 0, 1, Double.class, null, null, getDefaultValue(indices));
+        return new DefaultParameterDescriptor<>(properties, 0, 1, Double.class, null, null, getDefaultValue(indices));
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MatrixParametersAlphaNum.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -103,7 +103,7 @@ final class MatrixParametersAlphaNum ext
              */
             return wkt;
         }
-        final Map<String,Object> properties = new HashMap<String,Object>(6);
+        final Map<String,Object> properties = new HashMap<>(6);
         /*
          * Declare the EPSG identifier only for A0, A1, A2, B0, B1 and B2.
          */
@@ -114,7 +114,7 @@ final class MatrixParametersAlphaNum ext
         }
         properties.put(ParameterDescriptor.NAME_KEY, name);
         properties.put(ParameterDescriptor.ALIAS_KEY, wkt.getName());
-        return new DefaultParameterDescriptor<Double>(properties, 0, 1, Double.class, null, null, wkt.getDefaultValue());
+        return new DefaultParameterDescriptor<>(properties, 0, 1, Double.class, null, null, wkt.getDefaultValue());
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterBuilder.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -268,7 +268,7 @@ public class ParameterBuilder extends Bu
         } else if (Number.class.isAssignableFrom(valueClass)) {
             valueDomain = new NumberRange((Class) valueClass, (Number) minimumValue, true, (Number) maximumValue, true);
         } else {
-            valueDomain = new Range<T>(valueClass, minimumValue, true, maximumValue, true);
+            valueDomain = new Range<>(valueClass, minimumValue, true, maximumValue, true);
         }
         return create(valueClass, valueDomain, null, defaultValue);
     }
@@ -319,7 +319,7 @@ public class ParameterBuilder extends Bu
         final ParameterDescriptor<T> descriptor;
         onCreate(false);
         try {
-            descriptor = new DefaultParameterDescriptor<T>(properties, required ? 1 : 0, 1,
+            descriptor = new DefaultParameterDescriptor<>(properties, required ? 1 : 0, 1,
                     valueClass, valueDomain, validValues, defaultValue);
         } finally {
             onCreate(true);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterFormat.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -116,7 +116,7 @@ public class ParameterFormat extends Tab
     /**
      * An instance created when first needed and potentially shared.
      */
-    private static final AtomicReference<ParameterFormat> INSTANCE = new AtomicReference<ParameterFormat>();
+    private static final AtomicReference<ParameterFormat> INSTANCE = new AtomicReference<>();
 
     /**
      * The default column separator. User can change the separator
@@ -260,8 +260,8 @@ public class ParameterFormat extends Tab
      * Creates a new formatter for the default locale and timezone.
      */
     public ParameterFormat() {
-        super(Locale.getDefault(), TimeZone.getDefault());
-        displayLocale = super.getLocale(); // Implemented as Locale.getDefault(Locale.Category.DISPLAY) on the JDK7 branch.
+        super(Locale.getDefault(Locale.Category.FORMAT), TimeZone.getDefault());
+        displayLocale = Locale.getDefault(Locale.Category.DISPLAY);
         columnSeparator = SEPARATOR;
     }
 
@@ -289,6 +289,22 @@ public class ParameterFormat extends Tab
     }
 
     /**
+     * Returns the locale for the given category.
+     *
+     * <ul>
+     *   <li>{@link java.util.Locale.Category#FORMAT} specifies the locale to use for values.</li>
+     *   <li>{@link java.util.Locale.Category#DISPLAY} specifies the locale to use for labels.</li>
+     * </ul>
+     *
+     * @param  category The category for which a locale is desired.
+     * @return The locale for the given category (never {@code null}).
+     */
+    @Override
+    public Locale getLocale(final Locale.Category category) {
+        return (category == Locale.Category.DISPLAY) ? displayLocale : super.getLocale(category);
+    }
+
+    /**
      * Returns the amount of information to put in the table.
      * The default value is {@link ContentLevel#BRIEF}.
      *
@@ -436,7 +452,7 @@ public class ParameterFormat extends Tab
         final boolean             showObligation = !isBrief || (values == null);
         final boolean             hasColors      = (colors != null);
         final String              lineSeparator  = this.lineSeparator;
-        final Map<String,Integer> remarks        = new LinkedHashMap<String,Integer>();
+        final Map<String,Integer> remarks        = new LinkedHashMap<>();
         final ParameterTableRow   header         = new ParameterTableRow(group, displayLocale, preferredCodespaces, remarks, isBrief);
         final String              groupCodespace = header.getCodeSpace();
         /*
@@ -448,7 +464,7 @@ public class ParameterFormat extends Tab
         int codespaceWidth = 0;
         final Collection<?> elements = (values != null) ? values.values() : group.descriptors();
         final Map<GeneralParameterDescriptor, ParameterTableRow> descriptorValues =
-                new LinkedHashMap<GeneralParameterDescriptor, ParameterTableRow>(hashMapCapacity(elements.size()));
+                new LinkedHashMap<>(hashMapCapacity(elements.size()));
         List<Object> deferredGroups = null; // To be created only if needed (it is usually not).
         for (final Object element : elements) {
             final GeneralParameterValue parameter;
@@ -462,7 +478,7 @@ public class ParameterFormat extends Tab
             }
             if (descriptor instanceof ParameterDescriptorGroup) {
                 if (deferredGroups == null) {
-                    deferredGroups = new ArrayList<Object>(4);
+                    deferredGroups = new ArrayList<>(4);
                 }
                 deferredGroups.add(element);
                 continue;
@@ -802,8 +818,8 @@ public class ParameterFormat extends Tab
          * the scope of some alias to be processed below.
          */
         boolean hasIdentifiers = false;
-        final List<String[]> rows = new ArrayList<String[]>();
-        final Map<String,Integer> columnIndices = new LinkedHashMap<String,Integer>();
+        final List<String[]> rows = new ArrayList<>();
+        final Map<String,Integer> columnIndices = new LinkedHashMap<>();
         columnIndices.put(null, 0); // See above comment for the meaning of "null" here.
         if (preferredCodespaces != null) {
             for (final String codespace : preferredCodespaces) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterTableRow.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -130,9 +130,9 @@ final class ParameterTableRow {
     ParameterTableRow(final IdentifiedObject object, final Locale locale, final Set<String> preferredCodespaces,
             final Map<String,Integer> remarks, final boolean isBrief)
     {
-        values = new ArrayList<Object>(2); // In the vast majority of cases, we will have only one value.
-        units  = new ArrayList<Object>(2);
-        identifiers = new LinkedHashMap<String,Set<Object>>();
+        values = new ArrayList<>(2); // In the vast majority of cases, we will have only one value.
+        units  = new ArrayList<>(2);
+        identifiers = new LinkedHashMap<>();
         ReferenceIdentifier name = object.getName();
         if (name != null) { // Paranoiac check.
             final String codespace = name.getCodeSpace();
@@ -219,7 +219,7 @@ final class ParameterTableRow {
         }
         Set<Object> ids = identifiers.get(codespace);
         if (ids == null) {
-            ids = new LinkedHashSet<Object>(8);
+            ids = new LinkedHashSet<>(8);
             identifiers.put(codespace, ids);
         }
         ids.add(identifier);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/ParameterValueList.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -36,9 +36,6 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.referencing.IdentifiedObjects;
 
-// Related to JDK7
-import org.apache.sis.internal.jdk7.JDK7;
-
 
 /**
  * The list to be returned by {@link DefaultParameterValueGroup#values()}.
@@ -330,7 +327,7 @@ final class ParameterValueList extends A
         if (size == 0) {
             return "[]";
         }
-        final String lineSeparator = JDK7.lineSeparator();
+        final String lineSeparator = System.lineSeparator();
         final StringBuilder buffer = new StringBuilder();
         for (int i=0; i<size; i++) {
             buffer.append(values[i]).append(lineSeparator);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/Parameters.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -742,7 +742,7 @@ public abstract class Parameters impleme
             throws InvalidParameterNameException, InvalidParameterValueException
     {
         final Integer ZERO = 0;
-        final Map<String,Integer> occurrences = new HashMap<String,Integer>();
+        final Map<String,Integer> occurrences = new HashMap<>();
         for (final GeneralParameterValue value : values.values()) {
             final String name = value.getDescriptor().getName().getCode();
             final int occurrence = JDK8.getOrDefault(occurrences, name, ZERO);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorParameters.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -47,7 +47,7 @@ import org.apache.sis.util.ArgumentCheck
 import org.apache.sis.util.resources.Errors;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -233,13 +233,13 @@ public class TensorParameters<E> impleme
         /*
          * For the WKT1 convention, the "num_row" and "num_col" parameters are mandatory.
          */
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(Identifier.AUTHORITY_KEY, Citations.OGC);
         properties.put(Identifier.CODE_KEY, Constants.NUM_ROW);
-        ParameterDescriptor<Integer> numRow = new DefaultParameterDescriptor<Integer>(
+        ParameterDescriptor<Integer> numRow = new DefaultParameterDescriptor<>(
                 properties, 1, 1, Integer.class, valueDomain, null, defaultSize);
         properties.put(Identifier.CODE_KEY, Constants.NUM_COL);
-        ParameterDescriptor<Integer> numCol = new DefaultParameterDescriptor<Integer>(
+        ParameterDescriptor<Integer> numCol = new DefaultParameterDescriptor<>(
                 properties, 1, 1, Integer.class, valueDomain, null, defaultSize);
         WKT1 = new MatrixParameters(numRow, numCol);
         /*
@@ -247,9 +247,9 @@ public class TensorParameters<E> impleme
          * size if fixed to 3×3. However since we still need them, we will declare them as optional
          * and we will hide them from the descriptor unless the matrix size is different than 3×3.
          */
-        numRow = new DefaultParameterDescriptor<Integer>(IdentifiedObjects.getProperties(numRow),
+        numRow = new DefaultParameterDescriptor<>(IdentifiedObjects.getProperties(numRow),
                 0, 1, Integer.class, valueDomain, null, defaultSize);
-        numCol = new DefaultParameterDescriptor<Integer>(IdentifiedObjects.getProperties(numCol),
+        numCol = new DefaultParameterDescriptor<>(IdentifiedObjects.getProperties(numCol),
                 0, 1, Integer.class, valueDomain, null, defaultSize);
         ALPHANUM = new MatrixParametersAlphaNum(numRow, numCol);
     }
@@ -314,6 +314,7 @@ public class TensorParameters<E> impleme
      * @param dimensions  The parameter for the size of each dimension, usually in an array of length 2.
      *                    Length may be different if the caller wants to generalize usage of this class to tensors.
      */
+    @SafeVarargs
     @SuppressWarnings({"unchecked", "rawtypes"})
     public TensorParameters(final Class<E> elementType, final String prefix, final String separator,
             final ParameterDescriptor<Integer>... dimensions)
@@ -496,7 +497,7 @@ public class TensorParameters<E> impleme
     protected ParameterDescriptor<E> createElementDescriptor(final int[] indices) throws IllegalArgumentException {
         final Citation authority = dimensions[0].getName().getAuthority();
         final String name = indicesToName(indices);
-        return new DefaultParameterDescriptor<E>(
+        return new DefaultParameterDescriptor<>(
                 Collections.singletonMap(ParameterDescriptor.NAME_KEY, new NamedIdentifier(authority, name)),
                 0, 1, elementType, null, null, getDefaultValue(indices));
     }
@@ -726,7 +727,7 @@ public class TensorParameters<E> impleme
      * @return A new parameter group initialized to the default values.
      */
     public ParameterValueGroup createValueGroup(final Map<String,?> properties) {
-        return new TensorValues<E>(properties, this);
+        return new TensorValues<>(properties, this);
     }
 
     /**
@@ -744,7 +745,7 @@ public class TensorParameters<E> impleme
             throw new IllegalStateException();
         }
         ArgumentChecks.ensureNonNull("matrix", matrix);
-        final TensorValues<E> values = new TensorValues<E>(properties, this);
+        final TensorValues<E> values = new TensorValues<>(properties, this);
         values.setMatrix(matrix);
         return values;
     }
@@ -839,7 +840,7 @@ public class TensorParameters<E> impleme
             final Field field = TensorParameters.class.getDeclaredField("parameters");
             field.setAccessible(true);
             field.set(this, createCache());
-        } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
+        } catch (ReflectiveOperationException e) {
             throw new AssertionError(e);
         }
     }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/TensorValues.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -148,7 +148,7 @@ final class TensorValues<E> extends Abst
     @Override
     @SuppressWarnings("CloneDoesntCallSuperClone")
     public ParameterValueGroup clone() {
-        return new TensorValues<E>(this, true);
+        return new TensorValues<>(this, true);
     }
 
     /**
@@ -156,7 +156,7 @@ final class TensorValues<E> extends Abst
      */
     @Override
     public ParameterValueGroup createValue() {
-        return new TensorValues<E>(this, false);
+        return new TensorValues<>(this, false);
     }
 
     /**
@@ -306,7 +306,7 @@ final class TensorValues<E> extends Abst
      */
     @Override
     public List<GeneralParameterValue> values() {
-        final List<GeneralParameterValue> addTo = new ArrayList<GeneralParameterValue>();
+        final List<GeneralParameterValue> addTo = new ArrayList<>();
         for (final ParameterValue<Integer> dimension : dimensions) {
             if (!isOmitted(dimension)) {
                 addTo.add(dimension);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValue.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValue.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValue.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValue.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -68,7 +68,7 @@ final class UnmodifiableParameterValue<T
      */
     @SuppressWarnings("rawtypes")
     private static final WeakHashSet<UnmodifiableParameterValue> POOL =
-            new WeakHashSet<UnmodifiableParameterValue>(UnmodifiableParameterValue.class);
+            new WeakHashSet<>(UnmodifiableParameterValue.class);
 
     /**
      * Creates a new parameter with the same value than the given one.
@@ -89,7 +89,7 @@ final class UnmodifiableParameterValue<T
         if (parameter == null || parameter instanceof UnmodifiableParameterValue<?>) {
             return (UnmodifiableParameterValue<T>) parameter;
         } else {
-            return POOL.unique(new UnmodifiableParameterValue<T>(parameter));
+            return POOL.unique(new UnmodifiableParameterValue<>(parameter));
         }
     }
 
@@ -121,6 +121,6 @@ final class UnmodifiableParameterValue<T
     @Override
     @SuppressWarnings("CloneDoesntCallSuperClone")
     public DefaultParameterValue<T> clone() {
-        return new DefaultParameterValue<T>(this);
+        return new DefaultParameterValue<>(this);
     }
 }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValueGroup.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValueGroup.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValueGroup.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/UnmodifiableParameterValueGroup.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -34,7 +34,7 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.internal.util.UnmodifiableArrayList;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -156,7 +156,7 @@ final class UnmodifiableParameterValueGr
     @Override
     public List<ParameterValueGroup> groups(final String name) throws ParameterNotFoundException {
         ArgumentChecks.ensureNonNull("name", name);
-        final List<ParameterValueGroup> groups = new ArrayList<ParameterValueGroup>(4);
+        final List<ParameterValueGroup> groups = new ArrayList<>(4);
         for (final GeneralParameterValue value : values) {
             if (value instanceof ParameterValueGroup) {
                 if (IdentifiedObjects.isHeuristicMatchForName(value.getDescriptor(), name)) {

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -70,7 +70,7 @@ import static org.apache.sis.internal.ut
 import org.opengis.referencing.ReferenceIdentifier;
 import org.apache.sis.metadata.iso.DefaultIdentifier;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -35,7 +35,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/AuthorityFactories.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -59,10 +59,10 @@ final class AuthorityFactories<T extends
      * plus the EPSG factory.
      */
     static final MultiAuthoritiesFactory ALL = new MultiAuthoritiesFactory(
-            new AuthorityFactories<CRSAuthorityFactory>(CRSAuthorityFactory.class),
-            new AuthorityFactories<CSAuthorityFactory>(CSAuthorityFactory.class),
-            new AuthorityFactories<DatumAuthorityFactory>(DatumAuthorityFactory.class),
-            new AuthorityFactories<CoordinateOperationAuthorityFactory>(CoordinateOperationAuthorityFactory.class))
+            new AuthorityFactories<>(CRSAuthorityFactory.class),
+            new AuthorityFactories<>(CSAuthorityFactory.class),
+            new AuthorityFactories<>(DatumAuthorityFactory.class),
+            new AuthorityFactories<>(CoordinateOperationAuthorityFactory.class))
     {
         /** Anonymous constructor */ {
             setLenient(true);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/Builder.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -225,9 +225,9 @@ public abstract class Builder<B extends
      */
     protected Builder() {
         assert verifyParameterizedType(getClass());
-        properties  = new HashMap<String,Object>(8);
-        aliases     = new ArrayList<GenericName>();  // Will often stay empty (default constructor handles those cases well).
-        identifiers = new ArrayList<ReferenceIdentifier>();
+        properties  = new HashMap<>(8);
+        aliases     = new ArrayList<>();  // Will often stay empty (default constructor handles those cases well).
+        identifiers = new ArrayList<>();
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -689,7 +689,7 @@ public final class CRS extends Static {
                 singles = ((DefaultCompoundCRS) crs).getSingleComponents();
             } else {
                 final List<CoordinateReferenceSystem> elements = ((CompoundCRS) crs).getComponents();
-                singles = new ArrayList<SingleCRS>(elements.size());
+                singles = new ArrayList<>(elements.size());
                 ReferencingUtilities.getSingleComponents(elements, singles);
             }
         } else {




Mime
View raw message