sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1762629 [9/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/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterMarshallingTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -42,7 +42,7 @@ import org.junit.Test;
 import static org.apache.sis.test.ReferencingAssert.*;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -62,7 +62,7 @@ public final strictfp class ParameterMar
      * Creates a parameter value for marshalling test.
      */
     private static <T> DefaultParameterValue<T> create(final Class<T> type, final Range<?> valueDomain) {
-        return new DefaultParameterValue<T>(new DefaultParameterDescriptor<T>(
+        return new DefaultParameterValue<>(new DefaultParameterDescriptor<>(
                 Collections.singletonMap(DefaultParameterDescriptor.NAME_KEY,
                         "A parameter of type " + type.getSimpleName()),
                 1, 1, type, valueDomain, null, null));
@@ -108,7 +108,7 @@ public final strictfp class ParameterMar
      */
     @Test
     public void testDescriptor() throws JAXBException {
-        final DefaultParameterDescriptor<Double> descriptor = new DefaultParameterDescriptor<Double>(
+        final DefaultParameterDescriptor<Double> descriptor = new DefaultParameterDescriptor<>(
                 Collections.singletonMap(DefaultParameterDescriptor.NAME_KEY, "A descriptor"),
                 0, 1, Double.class, null, null, null);
         final String xml = XML.marshal(descriptor);

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/parameter/TensorParametersTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -97,7 +97,7 @@ public strictfp class TensorParametersTe
     @SuppressWarnings("unchecked")
     public TensorParametersTest() {
         if (WKT1 == null) {
-            WKT1 = new TensorParameters<Double>(Double.class, "elt_", "_",
+            WKT1 = new TensorParameters<>(Double.class, "elt_", "_",
                     TensorParameters.WKT1.getDimensionDescriptor(0),
                     TensorParameters.WKT1.getDimensionDescriptor(1));
         }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractIdentifiedObjectTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -58,7 +58,7 @@ public final strictfp class AbstractIden
      * @param identifier The value for the {@code "identifiers"} property.
      */
     private static Map<String,Object> properties(final Set<ReferenceIdentifier> identifiers) {
-        final Map<String,Object> properties = new HashMap<String,Object>(8);
+        final Map<String,Object> properties = new HashMap<>(8);
         assertNull(properties.put("name",       "GRS 1980"));
         assertNull(properties.put("identifiers", identifiers.toArray(new ReferenceIdentifier[identifiers.size()])));
         assertNull(properties.put("codespace",  "EPSG"));
@@ -102,7 +102,7 @@ public final strictfp class AbstractIden
     @Test
     @SuppressWarnings("ResultOfObjectAllocationIgnored")
     public void testMissingName() {
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         assertNull(properties.put(AbstractIdentifiedObject.REMARKS_KEY, "Not a name."));
         try {
             new AbstractIdentifiedObject(properties);
@@ -168,7 +168,7 @@ public final strictfp class AbstractIden
     @Test
     @DependsOnMethod("testWithSingleIdentifier")
     public void testWithManyIdentifiers() {
-        final Set<ReferenceIdentifier> identifiers = new LinkedHashSet<ReferenceIdentifier>(4);
+        final Set<ReferenceIdentifier> identifiers = new LinkedHashSet<>(4);
         assertTrue(identifiers.add(new NamedIdentifier(EPSG, "7019")));
         assertTrue(identifiers.add(new NamedIdentifier(EPSG, "IgnoreMe")));
         final AbstractIdentifiedObject object = new AbstractIdentifiedObject(properties(identifiers));
@@ -204,7 +204,7 @@ public final strictfp class AbstractIden
     @Test
     @DependsOnMethod("testWithManyIdentifiers")
     public void testIdentifierCollision() {
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         assertNull(properties.put("name", "GRS 1980"));
         assertNull(properties.put("identifiers", new NamedIdentifier(EPSG, "7019")));
         final AbstractIdentifiedObject o1 = new AbstractIdentifiedObject(properties);

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AbstractReferenceSystemTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -53,7 +53,7 @@ public final strictfp class AbstractRefe
      */
     @Test
     public void testCreateFromMap() {
-        final Map<String,Object> properties = new HashMap<String,Object>();
+        final Map<String,Object> properties = new HashMap<>();
         assertNull(properties.put("name",       "This is a name"));
         assertNull(properties.put("scope",      "This is a scope"));
         assertNull(properties.put("scope_fr",   "Valide dans ce domaine"));
@@ -76,7 +76,7 @@ public final strictfp class AbstractRefe
     @Test
     @DependsOnMethod("testCreateFromMap")
     public void testSerialization() {
-        final Map<String,Object> properties = new HashMap<String,Object>(8);
+        final Map<String,Object> properties = new HashMap<>(8);
         assertNull(properties.put("code",       "4326"));
         assertNull(properties.put("codeSpace",  "EPSG"));
         assertNull(properties.put("scope",      "This is a scope"));
@@ -96,7 +96,7 @@ public final strictfp class AbstractRefe
     @Test
     @DependsOnMethod("testCreateFromMap")
     public void testWKT() {
-        final Map<String,Object> properties = new HashMap<String,Object>(8);
+        final Map<String,Object> properties = new HashMap<>(8);
         assertNull(properties.put(NAME_KEY, "My “object”."));
         assertNull(properties.put(SCOPE_KEY, "Large scale topographic mapping and cadastre."));
         assertNull(properties.put(REMARKS_KEY, "注です。"));

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/BuilderTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -221,14 +221,18 @@ public final strictfp class BuilderTest
         builder.onCreate(true);
         for (final Map.Entry<String,?> entry : builder.properties.entrySet()) {
             final Object value = entry.getValue();
-            final String key = entry.getKey();
-            { // This is a switch(String) in the JDK7 branch.
-                if (key.equals(Identifier.AUTHORITY_KEY)) {
+            switch (entry.getKey()) {
+                case Identifier.AUTHORITY_KEY: {
                     assertSame("Authority and codespace shall be unchanged.", Citations.EPSG, value);
-                } else if (key.equals(ReferenceIdentifier.CODESPACE_KEY)) {
+                    break;
+                }
+                case ReferenceIdentifier.CODESPACE_KEY: {
                     assertEquals("Authority and codespace shall be unchanged.", "EPSG", value);
-                } else {
+                    break;
+                }
+                default: {
                     assertNull("Should not contain any non-null value except the authority.", value);
+                    break;
                 }
             }
         }
@@ -289,7 +293,7 @@ public final strictfp class BuilderTest
      */
     @Test
     public void testCreationFromObject() {
-        final Map<String,Object> properties = new HashMap<String,Object>();
+        final Map<String,Object> properties = new HashMap<>();
         final Identifier id = new SimpleIdentifier(null, "An identifier", false);
         assertNull(properties.put(AbstractIdentifiedObject.IDENTIFIERS_KEY, id));
         assertNull(properties.put(AbstractIdentifiedObject.ALIAS_KEY,       "An alias"));

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/CommonCRSTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/CommonCRSTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/CommonCRSTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/CommonCRSTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -73,7 +73,7 @@ public final strictfp class CommonCRSTes
      */
     @Test
     public void ensureNoCodeCollision() {
-        final Map<Integer,Enum<?>> codes = new HashMap<Integer,Enum<?>>();
+        final Map<Integer,Enum<?>> codes = new HashMap<>();
         final CommonCRS[] values = CommonCRS.values();
         for (final CommonCRS crs : values) {
             assertNoCodeCollision(codes, crs, crs.geographic);

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -198,7 +198,7 @@ public final strictfp class EPSGFactoryF
         final CRSAuthorityFactory EPSG = (CRSAuthorityFactory) AuthorityFactories.EPSG();
         try {
             setEPSGFactory(EPSGFactoryFallback.INSTANCE);
-            final ArrayList<String> codes = new ArrayList<String>(EPSGFactoryFallback.INSTANCE.getAuthorityCodes(CoordinateReferenceSystem.class));
+            final ArrayList<String> codes = new ArrayList<>(EPSGFactoryFallback.INSTANCE.getAuthorityCodes(CoordinateReferenceSystem.class));
             Collections.shuffle(codes, TestUtilities.createRandomNumberGenerator());
             for (final String code : codes) {
                 final CoordinateReferenceSystem crs = EPSGFactoryFallback.INSTANCE.createCoordinateReferenceSystem(code);

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/HardCodedCRS.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -251,7 +251,7 @@ public final strictfp class HardCodedCRS
      * Creates a map of properties for the given name and code with world extent.
      */
     private static Map<String,?> properties(final String name, final String code) {
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(NAME_KEY, name);
         properties.put(DOMAIN_OF_VALIDITY_KEY, Extents.WORLD);
         if (code != null) {

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/HardCodedAxes.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -475,7 +475,7 @@ public final strictfp class HardCodedAxe
             final AxisDirection direction, final Unit<?> unit, final double minimum, final double maximum,
             final RangeMeaning meaning)
     {
-        final Map<String,Object> properties = new HashMap<String,Object>(8);
+        final Map<String,Object> properties = new HashMap<>(8);
         properties.put(DefaultCoordinateSystemAxis.NAME_KEY, name);
         properties.put(DefaultCoordinateSystemAxis.MINIMUM_VALUE_KEY, minimum);
         properties.put(DefaultCoordinateSystemAxis.MAXIMUM_VALUE_KEY, maximum);

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -64,7 +64,7 @@ public final strictfp class DefaultGeode
      */
     @Test
     public void testCreateAndSerialize() {
-        final Map<String,Object> properties = new HashMap<String,Object>();
+        final Map<String,Object> properties = new HashMap<>();
         assertNull(properties.put(DefaultEllipsoid.NAME_KEY, "Asteroid"));
         final DefaultEllipsoid ellipsoid = DefaultEllipsoid.createEllipsoid(properties, 1200, 1000, SI.METRE);
 
@@ -127,7 +127,7 @@ public final strictfp class DefaultGeode
     @Test
     @DependsOnMethod("testCreateAndSerialize")
     public void testGetPositionVectorTransformation() {
-        final Map<String,Object> properties = new HashMap<String,Object>();
+        final Map<String,Object> properties = new HashMap<>();
         assertNull(properties.put(DefaultGeodeticDatum.NAME_KEY, "Invalid dummy datum"));
         /*
          * Associate two BursaWolfParameters, one valid only in a local area and the other one

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultTemporalDatumTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultTemporalDatumTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultTemporalDatumTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/DefaultTemporalDatumTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -54,7 +54,7 @@ public final strictfp class DefaultTempo
      * Creates the temporal datum to use for testing purpose.
      */
     private static DefaultTemporalDatum create() {
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         assertNull(properties.put(DefaultTemporalDatum.IDENTIFIERS_KEY,
                 new ImmutableIdentifier(HardCodedCitations.SIS, "SIS", "MJ")));
         assertNull(properties.put(DefaultTemporalDatum.NAME_KEY, "Modified Julian"));

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/datum/HardCodedDatum.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -171,7 +171,7 @@ public final strictfp class HardCodedDat
      * Creates a map of properties for the given name and EPSG code.
      */
     private static Map<String,?> properties(final String name, final String code, final CharSequence scope) {
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(NAME_KEY, name);
         if (code != null) {
             properties.put(IDENTIFIERS_KEY, new NamedIdentifier(HardCodedCitations.EPSG, code));

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/AuthorityFactoryMock.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -52,9 +52,8 @@ import static org.junit.Assert.*;
  * @version 0.7
  * @module
  */
-@org.apache.sis.internal.jdk7.AutoCloseable
 public final strictfp class AuthorityFactoryMock extends GeodeticAuthorityFactory implements CRSAuthorityFactory,
-        CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory
+        CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory, AutoCloseable
 {
     /**
      * The authority.
@@ -108,7 +107,7 @@ public final strictfp class AuthorityFac
     @Override
     public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> type) {
         assertFalse("This factory has been closed.", isClosed());
-        final Set<String> codes = new LinkedHashSet<String>();
+        final Set<String> codes = new LinkedHashSet<>();
         if (type.isAssignableFrom(GeocentricCRS.class)) add(codes, 4979);
         if (type.isAssignableFrom(GeographicCRS.class)) add(codes, 84, 4326);
         if (type.isAssignableFrom(PrimeMeridian.class)) add(codes, 8901, 8903, 8914);
@@ -206,6 +205,7 @@ public final strictfp class AuthorityFac
     /**
      * Flags this factory as closed.
      */
+    @Override
     public synchronized void close() {
         closed = true;
     }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactoryTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactoryTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/ConcurrentAuthorityFactoryTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -52,7 +52,7 @@ public final strictfp class ConcurrentAu
      */
     private static final strictfp class Mock extends ConcurrentAuthorityFactory<AuthorityFactoryMock> {
         /** All factories created by this mock, including any factories having been disposed. */
-        private final Queue<AuthorityFactoryMock> allDAOs = new ConcurrentLinkedQueue<AuthorityFactoryMock>();
+        private final Queue<AuthorityFactoryMock> allDAOs = new ConcurrentLinkedQueue<>();
 
         /** Creates a new concurrent authority factory. */
         Mock() {
@@ -70,7 +70,7 @@ public final strictfp class ConcurrentAu
 
         /** Returns a copy of the factories queue. */
         final synchronized List<AuthorityFactoryMock> createdDAOs() {
-            return new ArrayList<AuthorityFactoryMock>(allDAOs);
+            return new ArrayList<>(allDAOs);
         }
     }
 

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -38,7 +38,7 @@ import org.apache.sis.internal.metadata.
 import org.apache.sis.internal.metadata.sql.TestDatabase;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.StandardCharsets;
+import java.nio.charset.StandardCharsets;
 
 
 /**
@@ -141,12 +141,10 @@ public final class EPSGDataFormatter ext
             return;
         }
         final DataSource ds = TestDatabase.create("dummy");
-        final Connection c = ds.getConnection();
-        try {
+        try (Connection c = ds.getConnection()) {
             final EPSGDataFormatter f = new EPSGDataFormatter(c);
             f.run(new File(arguments[0]), new File(arguments[1]));
         } finally {
-            c.close();
             TestDatabase.drop(ds);
         }
     }
@@ -197,7 +195,7 @@ public final class EPSGDataFormatter ext
      */
     private EPSGDataFormatter(final Connection c) throws SQLException {
         super(c, Integer.MAX_VALUE);
-        final Map<String,int[]> m = new HashMap<String,int[]>();
+        final Map<String,int[]> m = new HashMap<>();
         m.put("epsg_alias",                     new int[] {   });
         m.put("epsg_area",                      new int[] {0  });
         m.put("epsg_change",                    new int[] {   });
@@ -247,8 +245,9 @@ public final class EPSGDataFormatter ext
             throw new IllegalArgumentException("Input and output files are the same.");
         }
         out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.ISO_8859_1));
-        final LineNumberReader in = new LineNumberReader(new InputStreamReader(new FileInputStream(inputFile), StandardCharsets.ISO_8859_1));
-        try {
+        try (final LineNumberReader in = new LineNumberReader(
+                new InputStreamReader(new FileInputStream(inputFile), StandardCharsets.ISO_8859_1)))
+        {
             out.write("---\n" +
                       "---    Copyright International Association of Oil and Gas Producers (IOGP)\n" +
                       "---    See  http://www.epsg.org/TermsOfUse  (a copy is in ./LICENSE.txt).\n" +
@@ -259,7 +258,6 @@ public final class EPSGDataFormatter ext
                       "\n");
             run(inputFile.getName(), in);
         } finally {
-            in.close();
             out.close();
             out = null;
         }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -104,7 +104,7 @@ public final strictfp class EPSGFactoryT
     @BeforeClass
     public static void createFactory() throws FactoryException {
         final GeodeticObjectFactory f = new GeodeticObjectFactory();
-        final Map<String,Object> properties = new HashMap<String,Object>(6);
+        final Map<String,Object> properties = new HashMap<>(6);
         assertNull(properties.put("datumFactory", f));
         assertNull(properties.put("csFactory", f));
         assertNull(properties.put("crsFactory", f));

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -157,11 +157,8 @@ public final strictfp class EPSGInstalle
         try {
             createAndTest(ds, scripts);
         } finally {
-            final Connection c = ds.getConnection(); Statement s = c.createStatement();
-            try {
+            try (Connection c = ds.getConnection(); Statement s = c.createStatement()) {
                 s.execute("SHUTDOWN");
-            } finally {
-                c.close();
             }
         }
         loggings.assertNextLogContains("EPSG", "jdbc:hsqldb:mem:test");
@@ -175,14 +172,13 @@ public final strictfp class EPSGInstalle
     private void createAndTest(final DataSource ds, final InstallationScriptProvider scriptProvider)
             throws SQLException, FactoryException
     {
-        final Map<String,Object> properties = new HashMap<String,Object>();
+        final Map<String,Object> properties = new HashMap<>();
         assertNull(properties.put("dataSource", ds));
         assertNull(properties.put("scriptProvider", scriptProvider));
         assertEquals("Should not contain EPSG tables before we created them.", 0, countCRSTables(ds));
         loggings.assertNoUnexpectedLog();       // Should not yet have logged anything at this point.
 
-        final EPSGFactory factory = new EPSGFactory(properties);
-        try {
+        try (EPSGFactory factory = new EPSGFactory(properties)) {
             /*
              * Fetch the "WGS 84" coordinate reference system.
              */
@@ -207,11 +203,9 @@ public final strictfp class EPSGInstalle
              * should not be included. The intend is to verify that the fields
              * of type BOOLEAN have been properly handled.
              */
-            codes = new HashSet<String>(codes);
+            codes = new HashSet<>(codes);
             assertTrue ("4979", codes.contains("4979"));
             assertFalse("4329", codes.contains("4329"));
-        } finally {
-            factory.close();
         }
         assertEquals("Should contain EPSG tables after we created them.", 1, countCRSTables(ds));
     }
@@ -222,20 +216,14 @@ public final strictfp class EPSGInstalle
      */
     private static int countCRSTables(final DataSource ds) throws SQLException {
         int count = 0;
-        final Connection c = ds.getConnection();
-        try {
-            final ResultSet r = c.getMetaData().getTables(null, null, "Coordinate Reference System", null);
-            try {
+        try (Connection c = ds.getConnection()) {
+            try (ResultSet r = c.getMetaData().getTables(null, null, "Coordinate Reference System", null)) {
                 while (r.next()) {
                     final String schema = r.getString("TABLE_SCHEM");
                     assertTrue(schema, "EPSG".equalsIgnoreCase(schema));
                     count++;
                 }
-            } finally {
-                r.close();
             }
-        } finally {
-            c.close();
         }
         return count;
     }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/CoordinateOperationFinderTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -830,7 +830,7 @@ public final strictfp class CoordinateOp
     @Test
     @DependsOnMethod("testProjected4D_to_2D")
     public void testSpatioTemporalToDerived() throws FactoryException, TransformException {
-        final Map<String,Object> properties = new HashMap<String,Object>();
+        final Map<String,Object> properties = new HashMap<>();
         properties.put(DerivedCRS.NAME_KEY, "Display");
         properties.put("conversion.name", "Display to WGS84");
 

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultConversionTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -157,7 +157,7 @@ public final strictfp class DefaultConve
          * did not bothered to define a specialized MathTransform class for our case. So we will help
          * a little bit DefaultConversion by telling it the parameters that we used.
          */
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String, Object> properties = new HashMap<>(4);
         properties.put(DefaultTransformation.NAME_KEY, "Paris to Greenwich");
         properties.put(ReferencingServices.PARAMETERS_KEY, pg);
         return new DefaultConversion(properties, sourceCRS, targetCRS, interpolationCRS,

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultOperationMethodTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -64,7 +64,7 @@ public final strictfp class DefaultOpera
     static DefaultOperationMethod create(final String method, final String identifier, final String formula,
             final Integer dimension, final ParameterDescriptor<?>... parameters)
     {
-        final Map<String,Object> properties = new HashMap<String,Object>(8);
+        final Map<String,Object> properties = new HashMap<>(8);
         assertNull(properties.put(OperationMethod.NAME_KEY, method));
         assertNull(properties.put(ReferenceIdentifier.CODESPACE_KEY, "EPSG"));
         assertNull(properties.put(Identifier.AUTHORITY_KEY, Citations.EPSG));

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -59,7 +59,7 @@ public final strictfp class DefaultTrans
     private static DefaultGeocentricCRS createCRS(final String name, final GeodeticDatum datum) {
         Map<String,?> properties = IdentifiedObjects.getProperties(datum, DefaultGeocentricCRS.IDENTIFIERS_KEY);
         if (name != null) {
-            final Map<String,Object> copy = new HashMap<String,Object>(properties);
+            final Map<String,Object> copy = new HashMap<>(properties);
             copy.put(DefaultGeocentricCRS.NAME_KEY, name);
             properties = copy;
         }
@@ -93,7 +93,7 @@ public final strictfp class DefaultTrans
          * did not bothered to define a specialized MathTransform class for our case. So we will help
          * a little bit DefaultTransformation by telling it the parameters that we used.
          */
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String, Object> properties = new HashMap<>(4);
         properties.put(DefaultTransformation.NAME_KEY, "Tokyo to JGD2000 (GSI)");
         properties.put(ReferencingServices.PARAMETERS_KEY, pg);
         return new DefaultTransformation(properties,

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -77,7 +77,7 @@ public final strictfp class SingleOperat
         };
         builder.addName(null, "Mercator (1SP)");
         final ParameterDescriptorGroup descriptor = builder.createGroup(parameters);
-        final Map<String,Object> properties = new HashMap<String,Object>(4);
+        final Map<String,Object> properties = new HashMap<>(4);
         properties.put(DefaultOperationMethod.NAME_KEY, descriptor.getName());
         properties.put(DefaultOperationMethod.FORMULA_KEY, new DefaultFormula("See EPSG guide."));
         return new DefaultOperationMethod(properties, 2, 2, descriptor);

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/InitializerTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/InitializerTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/InitializerTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/InitializerTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -72,7 +72,7 @@ public final strictfp class InitializerT
          * to do that since this map is provided by the ObliqueStereographic class itself.
          */
         final EnumMap<NormalizedProjection.ParameterRole, ParameterDescriptor<Double>> roles =
-                new EnumMap<NormalizedProjection.ParameterRole, ParameterDescriptor<Double>>(NormalizedProjection.ParameterRole.class);
+                new EnumMap<>(NormalizedProjection.ParameterRole.class);
         roles.put(NormalizedProjection.ParameterRole.CENTRAL_MERIDIAN, ObliqueStereographic.LONGITUDE_OF_ORIGIN);
         roles.put(NormalizedProjection.ParameterRole.SCALE_FACTOR,     ObliqueStereographic.SCALE_FACTOR);
         roles.put(NormalizedProjection.ParameterRole.FALSE_EASTING,    ObliqueStereographic.FALSE_EASTING);

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ProjectionResultComparator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ProjectionResultComparator.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ProjectionResultComparator.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/ProjectionResultComparator.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -113,7 +113,7 @@ final strictfp class ProjectionResultCom
                 final Object elliptical;
                 try {
                     elliptical = ellipticalClass.getDeclaredConstructor(ellipticalClass).newInstance(spherical);
-                } catch (Exception e) {  // ReflectiveOperationException on the JDK7 branch.
+                } catch (ReflectiveOperationException e) {
                     throw new AssertionError(e);    // Considered as a test failure.
                 }
                 /*

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransformTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransformTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransformTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransformTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -209,8 +209,7 @@ public strictfp class InterpolatedGeocen
                 "    Parameter[“tgt_semi_major”, 6378137.0],\n" +
                 "    Parameter[“tgt_semi_minor”, 6356752.314140356],\n" +
                 "    ParameterFile[“Geocentric translation file”, “\\E.*\\W\\Q" +
-                                   FranceGeocentricInterpolationTest.TEST_FILE + "”, Id[“EPSG”, 8727],\n" +
-                "      Remark[“\\E.*\\Q”]]],\n" +
+                                   FranceGeocentricInterpolationTest.TEST_FILE + "”, Id[“EPSG”, 8727]]],\n" +
                 "  Param_MT[“Affine parametric transformation”,\n" +
                 "    Parameter[“A0”, 57.29577951308232, Id[“EPSG”, 8623]],\n" +      // Radians to degrees conversion
                 "    Parameter[“B1”, 57.29577951308232, Id[“EPSG”, 8640]]]]\\E");

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransformTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransformTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransformTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/InterpolatedMolodenskyTransformTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -118,8 +118,7 @@ public final strictfp class Interpolated
                 "    Parameter[“Semi-major axis length difference”, -112.2, Id[“EPSG”, 8654]],\n" +
                 "    Parameter[“Flattening difference”, -5.4738838833299144E-5, Id[“EPSG”, 8655]],\n" +
                 "    ParameterFile[“Geocentric translation file”, “\\E.*\\W\\Q" +
-                                   FranceGeocentricInterpolationTest.TEST_FILE + "”, Id[“EPSG”, 8727],\n" +
-                "      Remark[“\\E.*\\Q”]],\n" +
+                                   FranceGeocentricInterpolationTest.TEST_FILE + "”, Id[“EPSG”, 8727]],\n" +
                 "    Parameter[“dim”, 2]],\n" +
                 "  Param_MT[“Affine parametric transformation”,\n" +
                 "    Parameter[“A0”, 57.29577951308232, Id[“EPSG”, 8623]],\n" +      // Radians to degrees conversion

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

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/RandomFailureTransform.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -71,7 +71,7 @@ final strictfp class RandomFailureTransf
         super(4,3);
         this.denominator = denominator;
         random = new Random(891914828L * denominator);
-        failures = new HashSet<Integer>();
+        failures = new HashSet<>();
     }
 
     /**

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/CoordinateOperationMethods.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/CoordinateOperationMethods.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/CoordinateOperationMethods.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/CoordinateOperationMethods.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -78,7 +78,7 @@ public strictfp class CoordinateOperatio
      */
     public static void main(final String[] args) throws IOException {
         final MathTransformFactory factory = DefaultFactories.forBuildin(MathTransformFactory.class);
-        final List<OperationMethod> methods = new ArrayList<OperationMethod>(factory.getAvailableMethods(SingleOperation.class));
+        final List<OperationMethod> methods = new ArrayList<>(factory.getAvailableMethods(SingleOperation.class));
         JDK8.removeIf(methods, new org.apache.sis.internal.jdk8.Predicate<OperationMethod>() {
             @Override public boolean test(OperationMethod method) {
                 return method.getClass().getName().endsWith("Mock");
@@ -95,14 +95,11 @@ public strictfp class CoordinateOperatio
                 return c;
             }
         });
-        final CoordinateOperationMethods writer = new CoordinateOperationMethods();
-        try {
+        try (final CoordinateOperationMethods writer = new CoordinateOperationMethods()) {
             writer.writeIndex(methods);
             for (final OperationMethod method : methods) {
                 writer.write(method);
             }
-        } finally {
-            writer.close();
         }
     }
 
@@ -329,7 +326,7 @@ public strictfp class CoordinateOperatio
         println("th class=\"sep\"", "Remarks");
         println("th class=\"sep\" colspan=\"3\"", "Value domain");
         println("th class=\"sep\"", "Default");
-        final Map<String,Integer> footnotes = new LinkedHashMap<String,Integer>();
+        final Map<String, Integer> footnotes = new LinkedHashMap<>();
         for (final GeneralParameterDescriptor gp : group.descriptors()) {
             if (isDeprecated(gp)) {
                 continue;   // Hide deprecated parameters.
@@ -419,7 +416,7 @@ public strictfp class CoordinateOperatio
     public static Map<String, DefaultGeographicBoundingBox> computeUnionOfAllDomainOfValidity(
             final CRSAuthorityFactory factory) throws FactoryException
     {
-        final Map<String, DefaultGeographicBoundingBox> domainOfValidity = new HashMap<String, DefaultGeographicBoundingBox>();
+        final Map<String, DefaultGeographicBoundingBox> domainOfValidity = new HashMap<>();
         for (final String code : factory.getAuthorityCodes(GeneralDerivedCRS.class)) {
             final CoordinateReferenceSystem crs;
             try {

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -93,7 +93,7 @@ abstract strictfp class HTMLGenerator im
         if (file.exists()) {
             throw new IOException("File " + file.getAbsolutePath() + " already exists.");
         }
-        openedTags = new ArrayDeque<String>();
+        openedTags = new ArrayDeque<>();
         out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), ENCODING));
         out.write("<!DOCTYPE html>");
         out.newLine();

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -62,7 +62,7 @@ public final strictfp class ConsistencyT
     /**
      * Codes to exclude for now.
      */
-    private static final Set<String> EXCLUDES = new HashSet<String>(Arrays.asList(
+    private static final Set<String> EXCLUDES = new HashSet<>(Arrays.asList(
             "CRS:1",            // Computer display
             "EPSG:5819"         // EPSG topocentric example A
     ));
@@ -97,10 +97,7 @@ public final strictfp class ConsistencyT
                 final CoordinateReferenceSystem crs;
                 try {
                     crs = CRS.forCode(code);
-                } catch (NoSuchIdentifierException e) {
-                    print(code, "WARNING", e.getLocalizedMessage());
-                    continue;
-                } catch (FactoryDataException e) {
+                } catch (NoSuchIdentifierException | FactoryDataException e) {
                     print(code, "WARNING", e.getLocalizedMessage());
                     continue;
                 }

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DatumShiftTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DatumShiftTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DatumShiftTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/DatumShiftTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -30,7 +30,7 @@ import org.junit.Test;
 import static org.apache.sis.test.Assume.*;
 
 // Branch-specific imports
-import org.apache.sis.internal.jdk7.Path;
+import java.nio.file.Path;
 
 
 /**

Modified: sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/test/integration/MetadataTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -87,7 +87,7 @@ import static org.apache.sis.test.Assert
 import static org.apache.sis.test.TestUtilities.getSingleton;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.StandardCharsets;
+import java.nio.charset.StandardCharsets;
 import org.apache.sis.internal.geoapi.evolution.UnsupportedCodeList;
 
 

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -86,10 +86,10 @@ class ClassPair<S,T> implements Serializ
      *
      * @return A key for the parent source, or {@code null}.
      */
-    @SuppressWarnings({"unchecked","rawtypes"})
     final ClassPair<? super S, T> parentSource() {
         final Class<? super S> source;
         if (sourceClass.isInterface()) {
+            @SuppressWarnings({"unchecked","rawtypes"})
             final Class<? super S>[] interfaces = (Class[]) sourceClass.getInterfaces();
             if (interfaces.length == 0) {
                 return null;
@@ -101,7 +101,7 @@ class ClassPair<S,T> implements Serializ
                 return null;
             }
         }
-        return new ClassPair(source, targetClass); // Checked in JDK7 branch.
+        return new ClassPair<>(source, targetClass);
     }
 
     /**

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -71,7 +71,6 @@ abstract class CollectionConverter<T> ex
         }
 
         @Override
-        @SuppressWarnings({"unchecked","rawtypes"})
         public java.util.List<?> apply(final Collection<?> source) {
             if (source == null) {
                 return null;
@@ -79,7 +78,7 @@ abstract class CollectionConverter<T> ex
             if (source instanceof java.util.List<?>) {
                 return (java.util.List<?>) source;
             }
-            return new ArrayList(source); // Checked in JDK7 branch.
+            return new ArrayList<>(source);
         }
     }
 
@@ -96,7 +95,6 @@ abstract class CollectionConverter<T> ex
         }
 
         @Override
-        @SuppressWarnings({"unchecked","rawtypes"})
         public java.util.Set<?> apply(final Collection<?> source) {
             if (source == null) {
                 return null;
@@ -104,7 +102,7 @@ abstract class CollectionConverter<T> ex
             if (source instanceof java.util.Set<?>) {
                 return (java.util.Set<?>) source;
             }
-            return new LinkedHashSet(source); // Checked in JDK7 branch.
+            return new LinkedHashSet<>(source);
         }
     }
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ConverterRegistry.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -84,7 +84,7 @@ public class ConverterRegistry {
      * Creates an initially empty set of object converters.
      */
     public ConverterRegistry() {
-        converters = new LinkedHashMap<ClassPair<?,?>, ObjectConverter<?,?>>();
+        converters = new LinkedHashMap<>();
     }
 
     /**
@@ -243,7 +243,6 @@ public class ConverterRegistry {
      * @param <T> The class of target (converted) values.
      * @param converter The converter to register.
      */
-    @SuppressWarnings({"unchecked","rawtypes"})
     public <S,T> void register(final ObjectConverter<S,T> converter) {
         ArgumentChecks.ensureNonNull("converter", converter);
         /*
@@ -274,7 +273,7 @@ public class ConverterRegistry {
                 initialize();
             }
             for (Class<? super T> i=targetClass; i!=null && i!=stopAt; i=i.getSuperclass()) {
-                register(new ClassPair(sourceClass, i), converter); // Checked in the JDK7 branch.
+                register(new ClassPair<>(sourceClass, i), converter);
             }
             /*
              * At this point, the given class and parent classes have been registered.
@@ -318,7 +317,7 @@ public class ConverterRegistry {
                     continue;
                 }
                 if (!i.isAssignableFrom(sourceClass)) {
-                    register(new ClassPair(sourceClass, i), converter); // Checked in the JDK7 branch.
+                    register(new ClassPair<>(sourceClass, i), converter);
                 }
             }
         }
@@ -439,7 +438,7 @@ public class ConverterRegistry {
     public <S,T> ObjectConverter<? super S, ? extends T> find(final Class<S> sourceClass, final Class<T> targetClass)
             throws UnconvertibleObjectException
     {
-        final ClassPair<S,T> key = new ClassPair<S,T>(sourceClass, targetClass);
+        final ClassPair<S,T> key = new ClassPair<>(sourceClass, targetClass);
         synchronized (converters) {
             ObjectConverter<? super S, ? extends T> converter = get(key);
             if (converter != null) {
@@ -490,7 +489,7 @@ public class ConverterRegistry {
             if (sourceComponent != null) {
                 final Class<?> targetComponent = targetClass.getComponentType();
                 if (targetComponent != null) {
-                    converter = new ArrayConverter<S,T>(sourceClass, targetClass, find(
+                    converter = new ArrayConverter<>(sourceClass, targetClass, find(
                             Numbers.primitiveToWrapper(sourceComponent),
                             Numbers.primitiveToWrapper(targetComponent)));
                     put(key, converter);

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -141,7 +141,7 @@ abstract class DateConverter<T> extends
 
         public SQL() { // Instantiated by ServiceLoader.
             super(java.sql.Date.class);
-            inverse = new IdentityConverter<Date, java.sql.Date>(targetClass, Date.class, this); // <T,S> in reverse order.
+            inverse = new IdentityConverter<>(targetClass, Date.class, this);
         }
 
         @Override public java.sql.Date apply(final Date source) {
@@ -161,7 +161,7 @@ abstract class DateConverter<T> extends
 
         public Timestamp() { // Instantiated by ServiceLoader.
             super(java.sql.Timestamp.class);
-            inverse = new IdentityConverter<Date, java.sql.Timestamp>(targetClass, Date.class, this); // <T,S> in reverse order.
+            inverse = new IdentityConverter<>(targetClass, Date.class, this);
         }
 
         @Override public java.sql.Timestamp apply(final Date source) {

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -248,7 +248,7 @@ final class FallbackConverter<S,T> exten
             /*
              * Both 'branch' and 'checked' are ordinary converters (not FallbackConverter).
              */
-            return new FallbackConverter<S,T>(branch.getSourceClass(), targetClass, branch, checked);
+            return new FallbackConverter<>(branch.getSourceClass(), targetClass, branch, checked);
         }
     }
 
@@ -291,7 +291,7 @@ final class FallbackConverter<S,T> exten
                 return null;
             }
         }
-        return new FallbackConverter<S,T>(sourceClass, targetClass, newPrimary, newFallback);
+        return new FallbackConverter<>(sourceClass, targetClass, newPrimary, newFallback);
     }
 
     /**
@@ -320,7 +320,7 @@ final class FallbackConverter<S,T> exten
             try {
                 return fallback.apply(source);
             } catch (UnconvertibleObjectException failure) {
-                // addSuppressed(failure) on the JDK7 branch.
+                exception.addSuppressed(failure);
                 throw exception;
             }
         }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -38,10 +38,7 @@ import org.apache.sis.math.FunctionPrope
  *
  * @see org.apache.sis.util.ObjectConverters#identity(Class)
  */
-public final class IdentityConverter<T, S extends T> extends SystemConverter<S,T> {
-    // JDK6 NOTE: Order of above <T> and <S> parameters is reversed compared to the
-    // JDK7 branch, because the JDK6 compiler does not supports forward reference.
-
+public final class IdentityConverter<S extends T, T> extends SystemConverter<S,T> {
     /**
      * For cross-version compatibility.
      */

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -27,6 +27,10 @@ import org.apache.sis.math.FunctionPrope
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.util.UnconvertibleObjectException;
 
+// Branch-specific import
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
 
 /**
  * Handles conversions between {@link Path}, {@link File}, {@link URI} and {@link URL} objects.
@@ -92,6 +96,66 @@ abstract class PathConverter<S,T> extend
     abstract T doConvert(S source) throws Exception;
 
     /**
+     * Converter from {@link Path} to {@link URI}.
+     */
+    public static final class PathURI extends PathConverter<Path,URI> {
+        private static final long serialVersionUID = 740202123888081482L;
+        static final PathURI INSTANCE = new PathURI();
+        public PathURI() {super(Path.class, URI.class);}        // Instantiated by ServiceLoader.
+
+        @Override public ObjectConverter<Path,URI> unique()  {return INSTANCE;}
+        @Override public ObjectConverter<URI,Path> inverse() {return URIPath.INSTANCE;}
+        @Override public URI doConvert(final Path source) {
+            return source.toUri();
+        }
+    }
+
+    /**
+     * Converter from {@link Path} to {@link URL}.
+     */
+    public static final class PathURL extends PathConverter<Path,URL> {
+        private static final long serialVersionUID = -289518201451769080L;
+        static final PathURL INSTANCE = new PathURL();
+        public PathURL() {super(Path.class, URL.class);}        // Instantiated by ServiceLoader.
+
+        @Override public ObjectConverter<Path,URL> unique()  {return INSTANCE;}
+        @Override public ObjectConverter<URL,Path> inverse() {return URLPath.INSTANCE;}
+        @Override public URL doConvert(final Path source) throws MalformedURLException {
+            return source.toUri().toURL();
+        }
+    }
+
+    /**
+     * Converter from {@link Path} to {@link File}.
+     */
+    public static final class PathFile extends PathConverter<Path,File> {
+        private static final long serialVersionUID = 452241851474627778L;
+        static final PathFile INSTANCE = new PathFile();
+        public PathFile() {super(Path.class, File.class);}      // Instantiated by ServiceLoader.
+
+        @Override public ObjectConverter<Path,File> unique()  {return INSTANCE;}
+        @Override public ObjectConverter<File,Path> inverse() {return FilePath.INSTANCE;}
+        @Override public File doConvert(final Path source) throws UnsupportedOperationException {
+            return source.toFile();
+        }
+    }
+
+    /**
+     * Converter from {@link File} to {@link Path}.
+     */
+    public static final class FilePath extends PathConverter<File,Path> {
+        private static final long serialVersionUID = 6420947028493989549L;
+        static final FilePath INSTANCE = new FilePath();
+        public FilePath() {super(File.class, Path.class);}      // Instantiated by ServiceLoader.
+
+        @Override public ObjectConverter<File,Path> unique()  {return INSTANCE;}
+        @Override public ObjectConverter<Path,File> inverse() {return PathFile.INSTANCE;}
+        @Override public Path doConvert(final File source) {
+            return source.toPath();
+        }
+    }
+
+    /**
      * Converter from {@link File} to {@link URI}.
      * This converter changes relative paths to absolute paths.
      */
@@ -122,6 +186,36 @@ abstract class PathConverter<S,T> extend
         }
     }
 
+    /**
+     * Converter from {@link URL} to {@link Path}.
+     */
+    public static final class URLPath extends PathConverter<URL,Path> {
+        private static final long serialVersionUID = 4030502499990629230L;
+        static final URLPath INSTANCE = new URLPath();
+        public URLPath() {super(URL.class, Path.class);}        // Instantiated by ServiceLoader.
+
+        @Override public ObjectConverter<URL,Path> unique()  {return INSTANCE;}
+        @Override public ObjectConverter<Path,URL> inverse() {return PathURL.INSTANCE;}
+        @Override public Path doConvert(final URL source) throws URISyntaxException {
+            return Paths.get(source.toURI());
+        }
+    }
+
+    /**
+     * Converter from {@link URI} to {@link Path}.
+     */
+    public static final class URIPath extends PathConverter<URI,Path> {
+        private static final long serialVersionUID = 5935532794533554151L;
+        static final URIPath INSTANCE = new URIPath();
+        public URIPath() {super(URI.class, Path.class);}        // Instantiated by ServiceLoader.
+
+        @Override public ObjectConverter<URI,Path> unique()  {return INSTANCE;}
+        @Override public ObjectConverter<Path,URI> inverse() {return PathURI.INSTANCE;}
+        @Override public Path doConvert(final URI source) throws IllegalArgumentException {
+            return Paths.get(source);
+        }
+    }
+
     /**
      * Converter from {@link URL} to {@link File}.
      */

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -18,9 +18,11 @@ package org.apache.sis.internal.converte
 
 import java.util.Set;
 import java.util.EnumSet;
+import java.util.IllformedLocaleException;
 import java.nio.charset.UnsupportedCharsetException;
 import java.net.URISyntaxException;
 import java.net.MalformedURLException;
+import java.nio.file.InvalidPathException;
 import org.apache.sis.math.FunctionProperty;
 import org.apache.sis.util.Locales;
 import org.apache.sis.util.Numbers;
@@ -94,7 +96,7 @@ abstract class StringConverter<T> extend
      * To be overridden by classes which need a specialized instance.
      */
     ObjectConverter<T, String> createInverse() {
-        return new ObjectToString<T>(targetClass, this);
+        return new ObjectToString<>(targetClass, this);
     }
 
     /**
@@ -238,10 +240,10 @@ abstract class StringConverter<T> extend
 
         /** See {@link StringConverter} for the conversion table. */
         @Override java.lang.Boolean doConvert(final String source) throws UnconvertibleObjectException {
-            // "String in switch" in the JDK7 branch.
-            final String lower = source.toLowerCase(java.util.Locale.US);
-            if (lower.equals("true")  || lower.equals("yes") || lower.equals("on")  || lower.equals("1")) return java.lang.Boolean.TRUE;
-            if (lower.equals("false") || lower.equals("no")  || lower.equals("off") || lower.equals("0")) return java.lang.Boolean.FALSE;
+            switch (source.toLowerCase(java.util.Locale.ROOT)) {
+                case "true":  case "yes": case "on":  case "1": return java.lang.Boolean.TRUE;
+                case "false": case "no":  case "off": case "0": return java.lang.Boolean.FALSE;
+            }
             throw new UnconvertibleObjectException(formatErrorMessage(source));
         }
     }
@@ -250,7 +252,7 @@ abstract class StringConverter<T> extend
         private static final long serialVersionUID = -794933131690043494L;
         public Locale() {super(java.util.Locale.class);}                            // Instantiated by ServiceLoader.
 
-        @Override java.util.Locale doConvert(String source) {
+        @Override java.util.Locale doConvert(String source) throws IllformedLocaleException {
             return Locales.parse(source);
         }
     }
@@ -273,6 +275,15 @@ abstract class StringConverter<T> extend
         }
     }
 
+    public static final class Path extends StringConverter<java.nio.file.Path> {
+        private static final long serialVersionUID = -1737315635965906042L;
+        public Path() {super(java.nio.file.Path.class);}                            // Instantiated by ServiceLoader.
+
+        @Override java.nio.file.Path doConvert(String source) throws InvalidPathException {
+            return java.nio.file.Paths.get(source);
+        }
+    }
+
     public static final class URI extends StringConverter<java.net.URI> {
         private static final long serialVersionUID = 7266486748714603336L;
         public URI() {super(java.net.URI.class);}                                   // Instantiated by ServiceLoader.
@@ -352,7 +363,7 @@ abstract class StringConverter<T> extend
 
         /** Invoked by the constructor for creating the inverse converter. */
         @Override ObjectConverter<T, String> createInverse() {
-            return new ObjectToString.CodeList<T>(targetClass, this);
+            return new ObjectToString.CodeList<>(targetClass, this);
         }
     }
 
@@ -384,7 +395,7 @@ abstract class StringConverter<T> extend
 
         /** Invoked by the constructor for creating the inverse converter. */
         @Override ObjectConverter<T, String> createInverse() {
-            return new ObjectToString.Enum<T>(targetClass, this);
+            return new ObjectToString.Enum<>(targetClass, this);
         }
     }
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -180,7 +180,7 @@ public final class SystemRegistry extend
          * CharSequence or Object), otherwise this converter would apply useless toString().
          */
         if (sourceClass == CharSequence.class) {
-            return (ObjectConverter<S,T>) new CharSequenceConverter<T>( // More checks in JDK7 branch.
+            return (ObjectConverter<S,T>) new CharSequenceConverter<>(
                     targetClass, find(String.class, targetClass));
         }
         /*
@@ -188,11 +188,11 @@ public final class SystemRegistry extend
          */
         if (sourceClass == String.class) {
             if (CodeList.class.isAssignableFrom(targetClass)) {
-                return (ObjectConverter<S,T>) new StringConverter.CodeList( // More checks in JDK7 branch.
+                return (ObjectConverter<S,T>) new StringConverter.CodeList<>(
                         targetClass.asSubclass(CodeList.class));
             }
             if (targetClass.isEnum()) {
-                return (ObjectConverter<S,T>) new StringConverter.Enum( // More checks in JDK7 branch.
+                return (ObjectConverter<S,T>) new StringConverter.Enum<>(
                         targetClass.asSubclass(Enum.class));
             }
         }
@@ -201,12 +201,12 @@ public final class SystemRegistry extend
          */
         if (sourceClass == Number.class || isSupportedNumber(sourceClass)) {
             if (isSupportedNumber(targetClass)) {
-                return (ObjectConverter<S,T>) new NumberConverter( // More checks in JDK7 branch.
+                return (ObjectConverter<S,T>) new NumberConverter<>(
                         sourceClass.asSubclass(Number.class),
                         targetClass.asSubclass(Number.class));
             }
             if (targetClass == Comparable.class) {
-                return (ObjectConverter<S,T>) new NumberConverter.Comparable( // More checks in JDK7 branch.
+                return (ObjectConverter<S,T>) new NumberConverter.Comparable<>(
                         sourceClass.asSubclass(Number.class));
             }
         }
@@ -214,7 +214,7 @@ public final class SystemRegistry extend
          * From various objects to String.
          */
         if (targetClass == String.class) {
-            return (ObjectConverter<S,T>) new ObjectToString<S>(sourceClass, null);
+            return (ObjectConverter<S,T>) new ObjectToString<>(sourceClass, null);
         }
         return null;
     }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -102,7 +102,7 @@ public final class Context extends Marsh
      * {@code finally} block by the {@link #finish()} method. This {@code ThreadLocal} shall
      * not contain any value when no (un)marshalling is in progress.
      */
-    private static final ThreadLocal<Context> CURRENT = new ThreadLocal<Context>();
+    private static final ThreadLocal<Context> CURRENT = new ThreadLocal<>();
 
     /**
      * The logger to use for warnings that are specific to XML.
@@ -218,15 +218,15 @@ public final class Context extends Marsh
                    final WarningListener<?> warningListener)
     {
         this.bitMasks          = bitMasks;
-        this.locales           = new LinkedList<Locale>();
+        this.locales           = new LinkedList<>();
         this.timezone          = timezone;
         this.schemas           = schemas; // No clone, because this class is internal.
         this.versionGML        = versionGML;
         this.resolver          = resolver;
         this.converter         = converter;
         this.warningListener   = warningListener;
-        this.identifiers       = new HashMap<String,Object>();
-        this.identifiedObjects = new IdentityHashMap<Object,String>();
+        this.identifiers       = new HashMap<>();
+        this.identifiedObjects = new IdentityHashMap<>();
         if ((bitMasks & MARSHALLING) != 0) {
             if (!Semaphores.queryAndSet(Semaphores.NULL_COLLECTION)) {
                 this.bitMasks |= CLEAR_SEMAPHORE;

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/IdentifierMapAdapter.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -37,7 +37,7 @@ import org.apache.sis.internal.util.SetO
 import static org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -192,7 +192,7 @@ public class IdentifierMapAdapter extend
      */
     @Override
     public final int size() {
-        final HashSet<Citation> done = new HashSet<Citation>(hashMapCapacity(identifiers.size()));
+        final HashSet<Citation> done = new HashSet<>(hashMapCapacity(identifiers.size()));
         for (final Identifier identifier : identifiers) {
             if (identifier != null) {
                 done.add(identifier.getAuthority());

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMap.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMap.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMap.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/ModifiableIdentifierMap.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -28,7 +28,7 @@ import org.apache.sis.xml.ValueConverter
 import org.apache.sis.xml.XLink;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -271,7 +271,7 @@ public final class ModifiableIdentifierM
             }
         }
         if (value != null) {
-            identifiers.add(new SpecializedIdentifier<T>(authority, value));
+            identifiers.add(new SpecializedIdentifier<>(authority, value));
         }
         return old;
     }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/NonMarshalledAuthority.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -218,7 +218,7 @@ public final class NonMarshalledAuthorit
         for (final Identifier id : identifiers) {
             if (id != null && id.getAuthority() instanceof NonMarshalledAuthority<?>) {
                 if (toPreserve == null) {
-                    toPreserve = new ArrayList<Identifier>(remaining);
+                    toPreserve = new ArrayList<>(remaining);
                 }
                 toPreserve.add(id);
             }
@@ -231,8 +231,8 @@ public final class NonMarshalledAuthorit
          * We find at least one identifier that may need to be preserved.
          * We need to create a combination of the two collections.
          */
-        final Map<Citation,Identifier> authorities = new IdentityHashMap<Citation,Identifier>(4);
-        final List<Identifier> merged = new ArrayList<Identifier>(newValues.size());
+        final Map<Citation,Identifier> authorities = new IdentityHashMap<>(4);
+        final List<Identifier> merged = new ArrayList<>(newValues.size());
         for (final Identifier id : newValues) {
             merged.add(id);
             if (id != null) {

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/PrimitiveTypeProperties.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/PrimitiveTypeProperties.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/PrimitiveTypeProperties.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/PrimitiveTypeProperties.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -59,7 +59,7 @@ public final class PrimitiveTypeProperti
      * <div class="section">Synchronization</div>
      * All accesses to this map shall be synchronized on the map object.
      */
-    private static final Map<Object,Object> SENTINEL_VALUES = new IdentityHashMap<Object,Object>();
+    private static final Map<Object,Object> SENTINEL_VALUES = new IdentityHashMap<>();
 
     /**
      * Do not allow instantiation of this class.

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/SpecializedIdentifier.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -32,7 +32,7 @@ import org.apache.sis.util.resources.Mes
 import org.apache.sis.internal.util.Citations;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -101,13 +101,13 @@ public final class SpecializedIdentifier
             final int ordinal = ((NonMarshalledAuthority) authority).ordinal;
             switch (ordinal) {
                 case NonMarshalledAuthority.ID: {
-                    return new SpecializedIdentifier<String>(IdentifierSpace.ID, code);
+                    return new SpecializedIdentifier<>(IdentifierSpace.ID, code);
                 }
                 case NonMarshalledAuthority.UUID: {
                     final Context context = Context.current();
                     final ValueConverter converter = Context.converter(context);
                     try {
-                        return new SpecializedIdentifier<UUID>(IdentifierSpace.UUID, converter.toUUID(context, code));
+                        return new SpecializedIdentifier<>(IdentifierSpace.UUID, converter.toUUID(context, code));
                     } catch (IllegalArgumentException e) {
                         parseFailure(context, code, UUID.class, e);
                         break;
@@ -125,11 +125,11 @@ public final class SpecializedIdentifier
                         break;
                     }
                     if (ordinal == NonMarshalledAuthority.HREF) {
-                        return new SpecializedIdentifier<URI>(IdentifierSpace.HREF, href);
+                        return new SpecializedIdentifier<>(IdentifierSpace.HREF, href);
                     }
                     final XLink xlink = new XLink();
                     xlink.setHRef(href);
-                    return new SpecializedIdentifier<XLink>(IdentifierSpace.XLINK, xlink);
+                    return new SpecializedIdentifier<>(IdentifierSpace.XLINK, xlink);
                 }
             }
         }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/TypeRegistration.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -91,7 +91,7 @@ public abstract class TypeRegistration {
          * 1) It would cache the TypeRegistration instances, which are not needed after this method call.
          * 2) The ClassLoader between different invocations may be different in an OSGi context.
          */
-        final ArrayList<Class<?>> types = new ArrayList<Class<?>>();
+        final ArrayList<Class<?>> types = new ArrayList<>();
         for (final TypeRegistration t : DefaultFactories.createServiceLoader(TypeRegistration.class)) {
             t.getTypes(types);
         }
@@ -115,7 +115,7 @@ public abstract class TypeRegistration {
             }
         }
         final JAXBContext instance = JAXBContext.newInstance(defaultClassesToBeBound());
-        context = new WeakReference<JAXBContext>(instance);
+        context = new WeakReference<>(instance);
         return instance;
     }
 }

Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gco/GO_CharacterString.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -261,7 +261,7 @@ public class GO_CharacterString {
         } else {
             namespace = XMLConstants.NULL_NS_URI;
         }
-        return new JAXBElement<CodeListUID>(new QName(namespace, name), CodeListUID.class,
+        return new JAXBElement<>(new QName(namespace, name), CodeListUID.class,
                 new CodeListUID(Context.current(), code));
     }
 




Mime
View raw message