sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1762629 [4/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-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -287,7 +287,7 @@ public abstract class ModifiableMetadata
                 if (target != null) {
                     target.clear();
                 } else {
-                    target = new CheckedArrayList<E>(elementType, source.size());
+                    target = new CheckedArrayList<>(elementType, source.size());
                 }
                 target.addAll(source);
             }
@@ -334,7 +334,7 @@ public abstract class ModifiableMetadata
                 if (target != null) {
                     target.clear();
                 } else {
-                    target = new CheckedHashSet<E>(elementType, source.size());
+                    target = new CheckedHashSet<>(elementType, source.size());
                 }
                 target.addAll(source);
             }
@@ -401,7 +401,7 @@ public abstract class ModifiableMetadata
                     if (useSet(elementType)) {
                         target = createSet(elementType, capacity);
                     } else {
-                        target = new CheckedArrayList<E>(elementType, capacity);
+                        target = new CheckedArrayList<>(elementType, capacity);
                     }
                 }
                 target.addAll(source);
@@ -425,7 +425,7 @@ public abstract class ModifiableMetadata
         if (isNullOrEmpty(source)) {
             return null;
         }
-        final List<E> target = new CheckedArrayList<E>(elementType, source.size());
+        final List<E> target = new CheckedArrayList<>(elementType, source.size());
         target.addAll(source);
         return target;
     }
@@ -445,7 +445,7 @@ public abstract class ModifiableMetadata
         if (isNullOrEmpty(source)) {
             return null;
         }
-        final Set<E> target = new CheckedHashSet<E>(elementType, source.size());
+        final Set<E> target = new CheckedHashSet<>(elementType, source.size());
         target.addAll(source);
         return target;
     }
@@ -473,7 +473,7 @@ public abstract class ModifiableMetadata
         if (useSet(elementType)) {
             target = createSet(elementType, capacity);
         } else {
-            target = new CheckedArrayList<E>(elementType, capacity);
+            target = new CheckedArrayList<>(elementType, capacity);
         }
         target.addAll(source);
         return target;
@@ -500,7 +500,7 @@ public abstract class ModifiableMetadata
         if (useSet(elementType)) {
             collection = createSet(elementType, INITIAL_CAPACITY);
         } else {
-            collection = new CheckedArrayList<E>(elementType, 1);
+            collection = new CheckedArrayList<>(elementType, 1);
         }
         collection.add(value);
         return collection;
@@ -541,7 +541,7 @@ public abstract class ModifiableMetadata
              * initially empty lists, but as of JDK8 this lazy instantiation works only for list having
              * the default capacity.
              */
-            return new CheckedArrayList<E>(elementType);
+            return new CheckedArrayList<>(elementType);
         }
         return Collections.emptyList();
     }
@@ -603,7 +603,7 @@ public abstract class ModifiableMetadata
         } else {
             if (isModifiable) {
                 // Do not specify an initial capacity for the reason explained in nonNullList(…).
-                return new CheckedArrayList<E>(elementType);
+                return new CheckedArrayList<>(elementType);
             } else {
                 return Collections.emptyList();
             }
@@ -622,7 +622,7 @@ public abstract class ModifiableMetadata
         if (CodeList.class.isAssignableFrom(elementType) && Modifier.isFinal(elementType.getModifiers())) {
             return new CodeListSet(elementType);
         }
-        return new CheckedHashSet<E>(elementType, capacity);
+        return new CheckedHashSet<>(elementType, capacity);
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/NameMap.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/NameMap.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/NameMap.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/NameMap.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -74,7 +74,7 @@ final class NameMap extends PropertyMap<
                     // PropertyAccessor.name(int) never return null if the index is valid.
                     throw new NoSuchElementException();
                 }
-                return new SimpleImmutableEntry<String,String>(accessor.name(index++, keyPolicy), value);
+                return new SimpleImmutableEntry<>(accessor.name(index++, keyPolicy), value);
             }
         };
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/ObjectPair.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -39,7 +39,7 @@ final class ObjectPair {
      */
     static final ThreadLocal<Set<ObjectPair>> CURRENT = new ThreadLocal<Set<ObjectPair>>() {
         @Override protected Set<ObjectPair> initialValue() {
-            return new HashSet<ObjectPair>();
+            return new HashSet<>();
         }
     };
 

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -264,7 +264,7 @@ class PropertyAccessor {
         /*
          * Compute all information derived from getters: setters, property names, value types.
          */
-        mapping      = new HashMap<String,Integer>(hashMapCapacity(allCount));
+        mapping      = new HashMap<>(hashMapCapacity(allCount));
         names        = new String[allCount];
         elementTypes = new Class<?>[allCount];
         Method[] setters = null;
@@ -407,7 +407,7 @@ class PropertyAccessor {
          * Indices map is used for choosing what to do in case of name collision.
          */
         Method[] getters = (MetadataStandard.IMPLEMENTATION_CAN_ALTER_API ? implementation : type).getMethods();
-        final Map<String,Integer> indices = new HashMap<String,Integer>(hashMapCapacity(getters.length));
+        final Map<String,Integer> indices = new HashMap<>(hashMapCapacity(getters.length));
         boolean hasExtraGetter = false;
         int count = 0;
         for (Method candidate : getters) {
@@ -650,7 +650,7 @@ class PropertyAccessor {
                 // implements the interface where the getter come from.
                 throw new AssertionError(error);
             }
-            information = new PropertyInformation(standard, name, getter, elementType, range);
+            information = new PropertyInformation<>(standard, name, getter, elementType, range);
             informations[index] = information;
         }
         return information;

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyComparator.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -95,7 +95,7 @@ final class PropertyComparator implement
      */
     PropertyComparator(Class<?> implementation) {
         this.implementation = implementation;
-        order = new HashMap<Object,Integer>();
+        order = new HashMap<>();
         do {
             final XmlType xml = implementation.getAnnotation(XmlType.class);
             if (xml != null) {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/Pruner.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -45,7 +45,7 @@ final class Pruner {
      * If the final operation requested by the user is {@code prune()}, then this map will contain a mix of
      * {@code false} and {@code true} values since the operation will unconditionally walk through the entire tree.
      */
-    private static final RecursivityGuard<Boolean> MAPS = new RecursivityGuard<Boolean>();
+    private static final RecursivityGuard<Boolean> MAPS = new RecursivityGuard<>();
 
     /**
      * For internal usage only.

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/RecursivityGuard.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/RecursivityGuard.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/RecursivityGuard.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/RecursivityGuard.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -50,7 +50,7 @@ final class RecursivityGuard<V> extends
      * The recursivity guard to use during {@code hashCode()} computations.
      * The values have no meaning for this map; only the keys matter.
      */
-    static final RecursivityGuard<Object> HASH_CODES = new RecursivityGuard<Object>();
+    static final RecursivityGuard<Object> HASH_CODES = new RecursivityGuard<>();
 
     /**
      * Creates a new thread-local map.
@@ -63,6 +63,6 @@ final class RecursivityGuard<V> extends
      */
     @Override
     protected Map<Object,V> initialValue() {
-        return new IdentityHashMap<Object,V>();
+        return new IdentityHashMap<>();
     }
 }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/StandardImplementation.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -89,7 +89,7 @@ final class StandardImplementation exten
         this.implementationPackage = implementationPackage;
         this.prefix                = prefix;
         this.acronyms              = acronyms;
-        this.implementations       = new IdentityHashMap<Class<?>,Class<?>>();
+        this.implementations       = new IdentityHashMap<>();
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNode.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -448,13 +448,13 @@ class TreeNode implements Node {
                     it.next(); // Inefficient way to move at the desired index, but hopefully rare.
                 }
                 return it.next();
-            } catch (RuntimeException e) { // (NullPointerException | IndexOutOfBoundsException | NoSuchElementException) on JDK7.
+            } catch (NullPointerException | IndexOutOfBoundsException | NoSuchElementException e) {
                 /*
                  * May happen if the collection for this metadata property changed after the iteration
                  * in the TreeNodeChildren. Users should not keep TreeNode references instances for a
                  * long time, but instead iterate again over TreeNodeChildren when needed.
                  */
-                throw (ConcurrentModificationException) new ConcurrentModificationException().initCause(e);
+                throw new ConcurrentModificationException(e);
             }
         }
 
@@ -489,7 +489,7 @@ class TreeNode implements Node {
                 ((List) values).set(indexInList, value);
             } catch (IndexOutOfBoundsException e) {
                 // Same rational than in the getUserObject() method.
-                throw (ConcurrentModificationException) new ConcurrentModificationException().initCause(e);
+                throw new ConcurrentModificationException(e);
             }
         }
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeNodeChildren.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -26,9 +26,6 @@ import org.apache.sis.util.collection.Tr
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.Debug;
 
-// Related to JDK7
-import org.apache.sis.internal.jdk7.JDK7;
-
 
 /**
  * The collection of children to be returned by {@link TreeNode#getChildren()}.
@@ -401,7 +398,7 @@ final class TreeNodeChildren extends Abs
                         if (nextValue != null) {
                             subIterator = ((Iterable<?>) nextValue).iterator();
                         } else {
-                            subIterator = Collections.emptySet().iterator();
+                            subIterator = Collections.emptyIterator();
                             // Null collections are illegal (it shall be empty collections instead),
                             // but we try to keep the iterator robut to ill-formed metadata, because
                             // we want AbstractMetadata.toString() to work so we can spot problems.
@@ -535,7 +532,7 @@ final class TreeNodeChildren extends Abs
     @Debug
     @Override
     public String toString() {
-        final String lineSeparator = JDK7.lineSeparator();
+        final String lineSeparator = System.lineSeparator();
         final StringBuilder buffer = new StringBuilder(512);
         parent.toString(buffer);
         buffer.append(lineSeparator);

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/TreeTableView.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -135,7 +135,7 @@ final class TreeTableView implements Tre
         synchronized (TreeTableView.class) {
             if (format == null) {
                 final TreeTableFormat f = new TreeTableFormat(
-                        Locale.getDefault(), TimeZone.getDefault());
+                        Locale.getDefault(Locale.Category.FORMAT), TimeZone.getDefault());
                 f.setColumns(TableColumn.NAME, TableColumn.VALUE);
                 format = f;
             }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -891,7 +891,7 @@ public class DefaultMetadata extends ISO
             if (newValue == null) {
                 return;
             }
-            newValues = new ArrayList<CitationDate>(1);
+            newValues = new ArrayList<>(1);
         } else {
             final Iterator<CitationDate> it = newValues.iterator();
             while (it.hasNext()) {
@@ -1015,7 +1015,7 @@ public class DefaultMetadata extends ISO
         checkWritePermission();
         final InternationalString i18n = (newValue != null) ? new SimpleInternationalString(newValue) : null;
         final List<Citation> newValues = (metadataStandards != null)
-                ? new ArrayList<Citation>(metadataStandards)
+                ? new ArrayList<>(metadataStandards)
                 : new ArrayList<Citation>(1);
         DefaultCitation citation = newValues.isEmpty() ? null : DefaultCitation.castOrCopy(newValues.get(0));
         if (citation == null) {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -41,7 +41,7 @@ import static org.apache.sis.util.CharSe
 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-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -182,7 +182,7 @@ public final class Citations extends Sta
      *
      * @since 0.4
      */
-    public static final IdentifierSpace<Integer> EPSG = new CitationConstant.Authority<Integer>(Constants.EPSG);
+    public static final IdentifierSpace<Integer> EPSG = new CitationConstant.Authority<>(Constants.EPSG);
 
     /**
      * The authority for identifiers of objects defined by the
@@ -266,7 +266,7 @@ public final class Citations extends Sta
      * @see #EPSG
      * @see #ESRI
      */
-    public static final IdentifierSpace<String> OGC = new CitationConstant.Authority<String>(Constants.OGC);
+    public static final IdentifierSpace<String> OGC = new CitationConstant.Authority<>(Constants.OGC);
 
     /**
      * The authority for identifiers of objects defined by <a href="http://www.esri.com">ESRI</a>.
@@ -301,7 +301,7 @@ public final class Citations extends Sta
      * @see #OGC
      * @see #EPSG
      */
-    public static final IdentifierSpace<String> ESRI = new CitationConstant.Authority<String>("ESRI");
+    public static final IdentifierSpace<String> ESRI = new CitationConstant.Authority<>("ESRI");
 
     /**
      * The authority for identifiers of objects defined by the
@@ -333,7 +333,7 @@ public final class Citations extends Sta
      *
      * @since 0.4
      */
-    public static final IdentifierSpace<String> NETCDF = new CitationConstant.Authority<String>("NetCDF");
+    public static final IdentifierSpace<String> NETCDF = new CitationConstant.Authority<>("NetCDF");
 
     /**
      * The authority for identifiers of objects defined by the
@@ -348,7 +348,7 @@ public final class Citations extends Sta
      *
      * @since 0.4
      */
-    public static final IdentifierSpace<Integer> GEOTIFF = new CitationConstant.Authority<Integer>("GeoTIFF");
+    public static final IdentifierSpace<Integer> GEOTIFF = new CitationConstant.Authority<>("GeoTIFF");
 
     /**
      * The authority for identifiers of objects defined by the <a href="http://trac.osgeo.org/proj/">Proj.4</a> project.
@@ -361,7 +361,7 @@ public final class Citations extends Sta
      *
      * @since 0.4
      */
-    public static final IdentifierSpace<String> PROJ4 = new CitationConstant.Authority<String>("Proj4");
+    public static final IdentifierSpace<String> PROJ4 = new CitationConstant.Authority<>("Proj4");
 
     /**
      * The authority for identifiers of objects defined by MapInfo.
@@ -374,7 +374,7 @@ public final class Citations extends Sta
      *
      * @since 0.6
      */
-    public static final IdentifierSpace<Integer> MAP_INFO = new CitationConstant.Authority<Integer>("MapInfo");
+    public static final IdentifierSpace<Integer> MAP_INFO = new CitationConstant.Authority<>("MapInfo");
 
     /**
      * The <a href="http://www.iho.int/iho_pubs/standard/S-57Ed3.1/31Main.pdf">IHO transfer standard
@@ -388,7 +388,7 @@ public final class Citations extends Sta
      *
      * @since 0.6
      */
-    public static final IdentifierSpace<Integer> S57 = new CitationConstant.Authority<Integer>("S57");
+    public static final IdentifierSpace<Integer> S57 = new CitationConstant.Authority<>("S57");
 
     /**
      * The <cite>International Standard Book Number</cite> (ISBN) defined by ISO-2108.
@@ -403,7 +403,7 @@ public final class Citations extends Sta
      *
      * @see DefaultCitation#getISBN()
      */
-    public static final IdentifierSpace<String> ISBN = new NonMarshalledAuthority<String>("ISBN", NonMarshalledAuthority.ISBN);
+    public static final IdentifierSpace<String> ISBN = new NonMarshalledAuthority<>("ISBN", NonMarshalledAuthority.ISBN);
 
     /**
      * The <cite>International Standard Serial Number</cite> (ISSN) defined by ISO-3297.
@@ -418,7 +418,7 @@ public final class Citations extends Sta
      *
      * @see DefaultCitation#getISSN()
      */
-    public static final IdentifierSpace<String> ISSN = new NonMarshalledAuthority<String>("ISSN", NonMarshalledAuthority.ISSN);
+    public static final IdentifierSpace<String> ISSN = new NonMarshalledAuthority<>("ISSN", NonMarshalledAuthority.ISSN);
 
     /**
      * The codespace of objects that are specific to the <a href="http://sis.apache.org">Apache SIS</a> project.

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultContact.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -269,7 +269,7 @@ public class DefaultContact extends ISOM
             if (newValue instanceof DefaultTelephone) {
                 newValues = ((DefaultTelephone) newValue).getOwner();
             } else {
-                newValues = new ArrayList<Telephone>(4);
+                newValues = new ArrayList<>(4);
                 for (String number : newValue.getVoices()) {
                     newValues.add(new DefaultTelephone(number, UnsupportedCodeList.VOICE));
                 }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultTelephone.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -287,7 +287,7 @@ public class DefaultTelephone extends IS
     final Collection<Telephone> getOwner() {
        if (owner == null) {
            if (isModifiable()) {
-               owner = new ArrayList<Telephone>(4);
+               owner = new ArrayList<>(4);
                owner.add(this);
            } else {
                owner = Collections.<Telephone>singletonList(this);

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

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -119,7 +119,7 @@ public final class Extents extends Stati
         GeographicBoundingBox bounds = null;
         if (extent != null) {
             DefaultGeographicBoundingBox modifiable = null;
-            final List<Envelope> fallbacks = new ArrayList<Envelope>();
+            final List<Envelope> fallbacks = new ArrayList<>();
             for (final GeographicExtent element : extent.getGeographicElements()) {
                 /*
                  * If a geographic bounding box can be obtained, add it to the previous boxes (if any).
@@ -321,7 +321,7 @@ public final class Extents extends Stati
         if (min == null && max == null) {
             return null;
         }
-        return new Range<Date>(Date.class, min, true, max, true);
+        return new Range<>(Date.class, min, true, max, true);
     }
 
     /**

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultAggregateInformation.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -204,7 +204,7 @@ public class DefaultAggregateInformation
              * If there is more than one value, replace only the first one and keep all other ones unchanged.
              * The intend is to be consistent with the getter method, which returns the first element.
              */
-            final ArrayList<Identifier> identifiers = new ArrayList<Identifier>(name.getIdentifiers());
+            final ArrayList<Identifier> identifiers = new ArrayList<>(name.getIdentifiers());
             if (identifiers.isEmpty()) {
                 identifiers.add(newValue);
             } else {

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/DefaultRepresentativeFraction.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -357,7 +357,7 @@ public class DefaultRepresentativeFracti
     @SuppressWarnings("ReturnOfCollectionOrArrayField")
     public Collection<Identifier> getIdentifiers() {
         if (identifiers == null) {
-            identifiers = new CheckedArrayList<Identifier>(Identifier.class);
+            identifiers = new CheckedArrayList<>(Identifier.class);
         }
         return identifiers;
     }

Modified: sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/OperationName.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/OperationName.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/OperationName.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/OperationName.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -62,7 +62,7 @@ final class OperationName extends Defaul
      * were identified only by a name in a {@code <srv:operationName>} element.</p>
      */
     static void resolve(final Collection<DefaultOperationMetadata> containsOperations, final Collection<DefaultCoupledResource> coupledResources) {
-        final Map<String,DefaultOperationMetadata> byName = new HashMap<String,DefaultOperationMetadata>();
+        final Map<String,DefaultOperationMetadata> byName = new HashMap<>();
         for (final DefaultOperationMetadata operation : containsOperations) {
             add(byName, operation.getOperationName(), operation);
         }

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/OtherLocalesTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/OtherLocalesTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/OtherLocalesTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/OtherLocalesTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -42,7 +42,7 @@ public final strictfp class OtherLocales
      */
     @Test
     public void testFilter() {
-        final Collection<Locale> languages = new LinkedHashSet<Locale>();
+        final Collection<Locale> languages = new LinkedHashSet<>();
         final Collection<Locale> otherLocales = OtherLocales.filter(languages);
         assertEquals("size", 0, otherLocales.size());
         /*
@@ -119,7 +119,7 @@ public final strictfp class OtherLocales
         assertSame("Shall set value in-place.", locales, OtherLocales.setFirst(locales, GERMAN));
         assertArrayEquals(new Locale[] {GERMAN, JAPANESE, FRENCH}, locales.toArray());
 
-        locales = new LinkedHashSet<Locale>(Arrays.asList(ENGLISH, JAPANESE, FRENCH));
+        locales = new LinkedHashSet<>(Arrays.asList(ENGLISH, JAPANESE, FRENCH));
         locales = OtherLocales.setFirst(locales, ITALIAN);
         assertArrayEquals(new Locale[] {ITALIAN, JAPANESE, FRENCH}, locales.toArray());
 

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -44,7 +44,7 @@ public final strictfp class WKTKeywordsT
      * @throws ReflectiveOperationException should never happen.
      */
     @Test
-    public void verifyConstantValues() throws Exception {
+    public void verifyConstantValues() throws ReflectiveOperationException {
         for (final Field field : WKTKeywords.class.getDeclaredFields()) {
             final String name = field.getName();
             final int modifiers = field.getModifiers();

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -24,8 +24,8 @@ import org.apache.sis.internal.system.Da
 import static org.junit.Assume.*;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Files;
-import org.apache.sis.internal.jdk7.Path;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 
 /**

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/ElementTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/ElementTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/ElementTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/ElementTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -296,7 +296,7 @@ public final strictfp class ElementTest
     @Test
     @DependsOnMethod({"testPullString", "testPullElement"})
     public void testFragments() throws ParseException {
-        sharedValues = new HashMap<Object,Object>();
+        sharedValues = new HashMap<>();
         Element frag = parse("Frag[“A”,“B”,“A”]");
         parser.fragments.put("MyFrag", frag);
         try {

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/InformationMapTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/InformationMapTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/InformationMapTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/InformationMapTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -68,7 +68,7 @@ public final strictfp class InformationM
         final Map<String,ExtendedElementInformation> descriptions = MetadataStandard.ISO_19115.asInformationMap(
                 EnvironmentalRecord.class, KeyNamePolicy.UML_IDENTIFIER);
 
-        final Set<String> expected = new HashSet<String>(Arrays.asList(
+        final Set<String> expected = new HashSet<>(Arrays.asList(
             "averageAirTemperature", "maxAltitude", "maxRelativeHumidity", "meteorologicalConditions"
         ));
         assertEquals(expected, descriptions.keySet());

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataStandardTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -261,7 +261,7 @@ public final strictfp class MetadataStan
         final Map<String,Object> map = std.asValueMap(instance,
                 KeyNamePolicy.JAVABEANS_PROPERTY, ValueExistencePolicy.NON_EMPTY);
         assertFalse(map.isEmpty()); // Actually 'testValueMap()' job, but verified for safety.
-        assertEquals("hashCode()", new HashSet<Object>(map.values()).hashCode() + Citation.class.hashCode(),
+        assertEquals("hashCode()", new HashSet<>(map.values()).hashCode() + Citation.class.hashCode(),
                 std.hashCode(instance));
     }
 

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/MetadataTestCase.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -139,7 +139,7 @@ public abstract strictfp class MetadataT
             }
             final CodeList[] codes = (CodeList[]) type.getMethod("values", (Class[]) null).invoke(null, (Object[]) null);
             return codes[random.nextInt(codes.length)];
-        } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
+        } catch (ReflectiveOperationException e) {
             fail(e.toString());
         }
         if (Locale.class.isAssignableFrom(type)) {
@@ -154,7 +154,7 @@ public abstract strictfp class MetadataT
             final Class<?> impl = getImplementation(type);
             if (impl != null) try {
                 return impl.getConstructor((Class<?>[]) null).newInstance((Object[]) null);
-            } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
+            } catch (ReflectiveOperationException e) {
                 fail(e.toString());
             }
         }
@@ -213,7 +213,7 @@ public abstract strictfp class MetadataT
         final Object instance;
         try {
             instance = accessor.implementation.getConstructor((Class<?>[]) null).newInstance((Object[]) null);
-        } catch (Exception e) { // (ReflectiveOperationException) on JDK7 branch.
+        } catch (ReflectiveOperationException e) {
             fail(e.toString());
             return;
         }

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/NameMapTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -52,21 +52,21 @@ public final strictfp class NameMapTest
         final Map<String,String> map = MetadataStandard.ISO_19115.asNameMap(
                 Citation.class, KeyNamePolicy.UML_IDENTIFIER, KeyNamePolicy.JAVABEANS_PROPERTY);
         assertArrayEquals(new Object[] {
-            new SimpleEntry<String,String>("title",                 "title"),
-            new SimpleEntry<String,String>("alternateTitle",        "alternateTitles"),
-            new SimpleEntry<String,String>("date",                  "dates"),
-            new SimpleEntry<String,String>("edition",               "edition"),
-            new SimpleEntry<String,String>("editionDate",           "editionDate"),
-            new SimpleEntry<String,String>("identifier",            "identifiers"),
-            new SimpleEntry<String,String>("citedResponsibleParty", "citedResponsibleParties"),
-            new SimpleEntry<String,String>("presentationForm",      "presentationForms"),
-            new SimpleEntry<String,String>("series",                "series"),
-            new SimpleEntry<String,String>("otherCitationDetails",  "otherCitationDetails"),
-//          new SimpleEntry<String,String>("collectiveTitle",       "collectiveTitle"),  -- deprecated as of ISO 19115:2014
-            new SimpleEntry<String,String>("ISBN",                  "ISBN"),
-            new SimpleEntry<String,String>("ISSN",                  "ISSN"),
-            new SimpleEntry<String,String>("graphic",               "graphics"),
-            new SimpleEntry<String,String>("onlineResource",        "onlineResources")
+            new SimpleEntry<>("title",                 "title"),
+            new SimpleEntry<>("alternateTitle",        "alternateTitles"),
+            new SimpleEntry<>("date",                  "dates"),
+            new SimpleEntry<>("edition",               "edition"),
+            new SimpleEntry<>("editionDate",           "editionDate"),
+            new SimpleEntry<>("identifier",            "identifiers"),
+            new SimpleEntry<>("citedResponsibleParty", "citedResponsibleParties"),
+            new SimpleEntry<>("presentationForm",      "presentationForms"),
+            new SimpleEntry<>("series",                "series"),
+            new SimpleEntry<>("otherCitationDetails",  "otherCitationDetails"),
+//          new SimpleEntry<>("collectiveTitle",       "collectiveTitle"),  -- deprecated as of ISO 19115:2014
+            new SimpleEntry<>("ISBN",                  "ISBN"),
+            new SimpleEntry<>("ISSN",                  "ISSN"),
+            new SimpleEntry<>("graphic",               "graphics"),
+            new SimpleEntry<>("onlineResource",        "onlineResources")
         }, map.entrySet().toArray());
 
         assertEquals("alternateTitles", map.get("alternateTitle"));
@@ -78,7 +78,7 @@ public final strictfp class NameMapTest
      */
     @Test
     public void testSentences() {
-        final Map<String,String> map, expected = new HashMap<String,String>();
+        final Map<String,String> map, expected = new HashMap<>();
         map = MetadataStandard.ISO_19115.asNameMap(EnvironmentalRecord.class, JAVABEANS_PROPERTY, SENTENCE);
         assertNull(expected.put("averageAirTemperature",    "Average air temperature"));
         assertNull(expected.put("maxAltitude",              "Max altitude"));

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyAccessorTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -553,7 +553,7 @@ public final strictfp class PropertyAcce
         final List<InternationalString> newTitles = Arrays.<InternationalString>asList(
                 new SimpleInternationalString("New title 1"),
                 new SimpleInternationalString("New title 2"));
-        final List<InternationalString> merged = new ArrayList<InternationalString>(oldTitles);
+        final List<InternationalString> merged = new ArrayList<>(oldTitles);
         assertTrue(merged.addAll(newTitles));
 
         // Set the title.

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/PropertyInformationTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -58,7 +58,7 @@ public final strictfp class PropertyInfo
     private static <T> PropertyInformation<T> create(final Class<T> elementType, final String method,
             final String property) throws NoSuchMethodException
     {
-        return new PropertyInformation<T>(HardCodedCitations.ISO_19115, property,
+        return new PropertyInformation<>(HardCodedCitations.ISO_19115, property,
                 Citation.class.getMethod(method), elementType, null);
     }
 
@@ -140,7 +140,7 @@ public final strictfp class PropertyInfo
     @Test
     @SuppressWarnings("UnnecessaryBoxing")
     public void testGetDomainValue() throws NoSuchMethodException {
-        final ExtendedElementInformation information = new PropertyInformation<Double>(HardCodedCitations.ISO_19115,
+        final ExtendedElementInformation information = new PropertyInformation<>(HardCodedCitations.ISO_19115,
                 "maxRelativeHumidity", EnvironmentalRecord.class.getMethod("getMaxRelativeHumidity"), Double.class,
                 DefaultEnvironmentalRecord.class.getMethod("getMaxRelativeHumidity").getAnnotation(ValueRange.class));
 

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeNodeChildrenTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -370,7 +370,7 @@ public final strictfp class TreeNodeChil
      * @param children The collection from which to remove elements.
      */
     private static void testRemove(final Random random, final TreeNodeChildren children) {
-        final List<TreeTable.Node> reference = new ArrayList<TreeTable.Node>(children);
+        final List<TreeTable.Node> reference = new ArrayList<>(children);
         assertFalse("The collection shall not be initially empty.", reference.isEmpty());
         do {
             final Iterator<TreeTable.Node> rit = reference.iterator(); // The reference iterator.

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -96,19 +96,13 @@ public final strictfp class TreeTableVie
         final Object original = create(ValueExistencePolicy.NON_EMPTY);
         final Object deserialized;
         final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-        final ObjectOutputStream out = new ObjectOutputStream(buffer);
-        try {
+        try (ObjectOutputStream out = new ObjectOutputStream(buffer)) {
             out.writeObject(original);
-        } finally {
-            out.close();
         }
         // Now reads the object we just serialized.
         final byte[] data = buffer.toByteArray();
-        final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(data));
-        try {
+        try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(data))) {
             deserialized = in.readObject();
-        } finally {
-            in.close();
         }
         assertMultilinesEquals(EXPECTED, formatNameAndValue((TreeTableView) deserialized));
     }

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/TypeMapTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -64,21 +64,21 @@ public final strictfp class TypeMapTest
         final Map<String,Class<?>> map = MetadataStandard.ISO_19115.asTypeMap(
                 Citation.class, KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.ELEMENT_TYPE);
         assertArrayEquals(new Object[] {
-            new SimpleEntry<String,Class<?>>("title",                 InternationalString.class),
-            new SimpleEntry<String,Class<?>>("alternateTitle",        InternationalString.class),
-            new SimpleEntry<String,Class<?>>("date",                  CitationDate.class),
-            new SimpleEntry<String,Class<?>>("edition",               InternationalString.class),
-            new SimpleEntry<String,Class<?>>("editionDate",           Date.class),
-            new SimpleEntry<String,Class<?>>("identifier",            Identifier.class),
-            new SimpleEntry<String,Class<?>>("citedResponsibleParty", ResponsibleParty.class),
-            new SimpleEntry<String,Class<?>>("presentationForm",      PresentationForm.class),
-            new SimpleEntry<String,Class<?>>("series",                Series.class),
-            new SimpleEntry<String,Class<?>>("otherCitationDetails",  InternationalString.class),
-//          new SimpleEntry<String,Class<?>>("collectiveTitle",       InternationalString.class),  -- deprecated as of ISO 19115:2014
-            new SimpleEntry<String,Class<?>>("ISBN",                  String.class),
-            new SimpleEntry<String,Class<?>>("ISSN",                  String.class),
-            new SimpleEntry<String,Class<?>>("graphic",               BrowseGraphic.class),
-            new SimpleEntry<String,Class<?>>("onlineResource",        OnlineResource.class)
+            new SimpleEntry<>("title",                 InternationalString.class),
+            new SimpleEntry<>("alternateTitle",        InternationalString.class),
+            new SimpleEntry<>("date",                  CitationDate.class),
+            new SimpleEntry<>("edition",               InternationalString.class),
+            new SimpleEntry<>("editionDate",           Date.class),
+            new SimpleEntry<>("identifier",            Identifier.class),
+            new SimpleEntry<>("citedResponsibleParty", ResponsibleParty.class),
+            new SimpleEntry<>("presentationForm",      PresentationForm.class),
+            new SimpleEntry<>("series",                Series.class),
+            new SimpleEntry<>("otherCitationDetails",  InternationalString.class),
+//          new SimpleEntry<>("collectiveTitle",       InternationalString.class),  -- deprecated as of ISO 19115:2014
+            new SimpleEntry<>("ISBN",                  String.class),
+            new SimpleEntry<>("ISSN",                  String.class),
+            new SimpleEntry<>("graphic",               BrowseGraphic.class),
+            new SimpleEntry<>("onlineResource",        OnlineResource.class)
         }, map.entrySet().toArray());
 
         assertEquals(InternationalString.class, map.get("alternateTitle"));

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/ValueMapTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -141,10 +141,10 @@ public final strictfp class ValueMapTest
         final Map<String,Object> map = createCitation();
         assertEquals(1, citation.getIdentifiers().size());
         assertArrayEquals(new SimpleEntry<?,?>[] {
-            new SimpleEntry<String,Object>("title",                   title),
-            new SimpleEntry<String,Object>("identifiers",             citation.getIdentifiers()),
-            new SimpleEntry<String,Object>("citedResponsibleParties", singletonList(author)),
-            new SimpleEntry<String,Object>("ISBN",                    "9782505004509")
+            new SimpleEntry<>("title",                   title),
+            new SimpleEntry<>("identifiers",             citation.getIdentifiers()),
+            new SimpleEntry<>("citedResponsibleParties", singletonList(author)),
+            new SimpleEntry<>("ISBN",                    "9782505004509")
         }, map.entrySet().toArray());
     }
 
@@ -165,15 +165,15 @@ public final strictfp class ValueMapTest
         assertTrue ("'all' shall be a larger map than 'map'.", all.entrySet().containsAll(map.entrySet()));
         assertFalse("'all' shall be a larger map than 'map'.", map.entrySet().containsAll(all.entrySet()));
         assertArrayEquals(new SimpleEntry<?,?>[] {
-            new SimpleEntry<String,Object>("title",                   title),
-            new SimpleEntry<String,Object>("alternateTitles",         emptyList()),
-            new SimpleEntry<String,Object>("dates",                   emptyList()),
-            new SimpleEntry<String,Object>("identifiers",             citation.getIdentifiers()),
-            new SimpleEntry<String,Object>("citedResponsibleParties", singletonList(author)),
-            new SimpleEntry<String,Object>("presentationForms",       emptySet()),
-            new SimpleEntry<String,Object>("ISBN",                    "9782505004509"),
-            new SimpleEntry<String,Object>("graphics",                emptyList()),
-            new SimpleEntry<String,Object>("onlineResources",         emptyList())
+            new SimpleEntry<>("title",                   title),
+            new SimpleEntry<>("alternateTitles",         emptyList()),
+            new SimpleEntry<>("dates",                   emptyList()),
+            new SimpleEntry<>("identifiers",             citation.getIdentifiers()),
+            new SimpleEntry<>("citedResponsibleParties", singletonList(author)),
+            new SimpleEntry<>("presentationForms",       emptySet()),
+            new SimpleEntry<>("ISBN",                    "9782505004509"),
+            new SimpleEntry<>("graphics",                emptyList()),
+            new SimpleEntry<>("onlineResources",         emptyList())
         }, all.entrySet().toArray());
     }
 
@@ -194,16 +194,16 @@ public final strictfp class ValueMapTest
         assertTrue ("'all' shall be a larger map than 'map'.", all.entrySet().containsAll(map.entrySet()));
         assertFalse("'all' shall be a larger map than 'map'.", map.entrySet().containsAll(all.entrySet()));
         assertArrayEquals(new SimpleEntry<?,?>[] {
-            new SimpleEntry<String,Object>("title",                   title),
-            new SimpleEntry<String,Object>("alternateTitles",         emptyList()),
-            new SimpleEntry<String,Object>("dates",                   emptyList()),
-            new SimpleEntry<String,Object>("edition",                 NilReason.UNKNOWN.createNilObject(InternationalString.class)),
-            new SimpleEntry<String,Object>("identifiers",             citation.getIdentifiers()),
-            new SimpleEntry<String,Object>("citedResponsibleParties", singletonList(author)),
-            new SimpleEntry<String,Object>("presentationForms",       emptySet()),
-            new SimpleEntry<String,Object>("ISBN",                    "9782505004509"),
-            new SimpleEntry<String,Object>("graphics",                emptyList()),
-            new SimpleEntry<String,Object>("onlineResources",         emptyList())
+            new SimpleEntry<>("title",                   title),
+            new SimpleEntry<>("alternateTitles",         emptyList()),
+            new SimpleEntry<>("dates",                   emptyList()),
+            new SimpleEntry<>("edition",                 NilReason.UNKNOWN.createNilObject(InternationalString.class)),
+            new SimpleEntry<>("identifiers",             citation.getIdentifiers()),
+            new SimpleEntry<>("citedResponsibleParties", singletonList(author)),
+            new SimpleEntry<>("presentationForms",       emptySet()),
+            new SimpleEntry<>("ISBN",                    "9782505004509"),
+            new SimpleEntry<>("graphics",                emptyList()),
+            new SimpleEntry<>("onlineResources",         emptyList())
         }, all.entrySet().toArray());
     }
 
@@ -222,21 +222,21 @@ public final strictfp class ValueMapTest
         assertTrue ("'all' shall be a larger map than 'map'.", all.entrySet().containsAll(map.entrySet()));
         assertFalse("'all' shall be a larger map than 'map'.", map.entrySet().containsAll(all.entrySet()));
         assertArrayEquals(new SimpleEntry<?,?>[] {
-            new SimpleEntry<String,Object>("title",                   title),
-            new SimpleEntry<String,Object>("alternateTitles",         emptyList()),
-            new SimpleEntry<String,Object>("dates",                   emptyList()),
-            new SimpleEntry<String,Object>("edition",                 NilReason.UNKNOWN.createNilObject(InternationalString.class)),
-            new SimpleEntry<String,Object>("editionDate",             null),
-            new SimpleEntry<String,Object>("identifiers",             citation.getIdentifiers()),
-            new SimpleEntry<String,Object>("citedResponsibleParties", singletonList(author)),
-            new SimpleEntry<String,Object>("presentationForms",       emptySet()),
-            new SimpleEntry<String,Object>("series",                  null),
-            new SimpleEntry<String,Object>("otherCitationDetails",    null),
-//          new SimpleEntry<String,Object>("collectiveTitle",         null),  -- deprecated as of ISO 19115:2014.
-            new SimpleEntry<String,Object>("ISBN",                    "9782505004509"),
-            new SimpleEntry<String,Object>("ISSN",                    null),
-            new SimpleEntry<String,Object>("graphics",                emptyList()),
-            new SimpleEntry<String,Object>("onlineResources",         emptyList())
+            new SimpleEntry<>("title",                   title),
+            new SimpleEntry<>("alternateTitles",         emptyList()),
+            new SimpleEntry<>("dates",                   emptyList()),
+            new SimpleEntry<>("edition",                 NilReason.UNKNOWN.createNilObject(InternationalString.class)),
+            new SimpleEntry<>("editionDate",             null),
+            new SimpleEntry<>("identifiers",             citation.getIdentifiers()),
+            new SimpleEntry<>("citedResponsibleParties", singletonList(author)),
+            new SimpleEntry<>("presentationForms",       emptySet()),
+            new SimpleEntry<>("series",                  null),
+            new SimpleEntry<>("otherCitationDetails",    null),
+//          new SimpleEntry<>("collectiveTitle",         null),  -- deprecated as of ISO 19115:2014.
+            new SimpleEntry<>("ISBN",                    "9782505004509"),
+            new SimpleEntry<>("ISSN",                    null),
+            new SimpleEntry<>("graphics",                emptyList()),
+            new SimpleEntry<>("onlineResources",         emptyList())
         }, all.entrySet().toArray());
     }
 
@@ -261,8 +261,8 @@ public final strictfp class ValueMapTest
         assertNull("ISBN shall have been removed.", citation.getISBN());
         assertTrue("ISBN shall have been removed.", citation.getIdentifiers().isEmpty());
         assertArrayEquals(new SimpleEntry<?,?>[] {
-            new SimpleEntry<String,Object>("title",                   title),
-            new SimpleEntry<String,Object>("citedResponsibleParties", singletonList(author))
+            new SimpleEntry<>("title",                   title),
+            new SimpleEntry<>("citedResponsibleParties", singletonList(author))
         }, map.entrySet().toArray());
         /*
          * Add a value. Result shall be:
@@ -276,9 +276,9 @@ public final strictfp class ValueMapTest
         assertNull(map.put("presentationForm", DOCUMENT_HARDCOPY));
         assertEquals(DOCUMENT_HARDCOPY, getSingleton(citation.getPresentationForms()));
         assertArrayEquals(new SimpleEntry<?,?>[] {
-            new SimpleEntry<String,Object>("title",                   title),
-            new SimpleEntry<String,Object>("citedResponsibleParties", singletonList(author)),
-            new SimpleEntry<String,Object>("presentationForms",       singleton(DOCUMENT_HARDCOPY))
+            new SimpleEntry<>("title",                   title),
+            new SimpleEntry<>("citedResponsibleParties", singletonList(author)),
+            new SimpleEntry<>("presentationForms",       singleton(DOCUMENT_HARDCOPY))
         }, map.entrySet().toArray());
         /*
          * Add back the ISBN value. Result shall be:
@@ -295,11 +295,11 @@ public final strictfp class ValueMapTest
         assertEquals("9782505004509", citation.getISBN());
         assertEquals("ISBN shall appears in the identifier list.", 1, citation.getIdentifiers().size());
         assertArrayEquals(new SimpleEntry<?,?>[] {
-            new SimpleEntry<String,Object>("title",                   title),
-            new SimpleEntry<String,Object>("identifiers",             citation.getIdentifiers()),
-            new SimpleEntry<String,Object>("citedResponsibleParties", singletonList(author)),
-            new SimpleEntry<String,Object>("presentationForms",       singleton(DOCUMENT_HARDCOPY)),
-            new SimpleEntry<String,Object>("ISBN",                    "9782505004509")
+            new SimpleEntry<>("title",                   title),
+            new SimpleEntry<>("identifiers",             citation.getIdentifiers()),
+            new SimpleEntry<>("citedResponsibleParties", singletonList(author)),
+            new SimpleEntry<>("presentationForms",       singleton(DOCUMENT_HARDCOPY)),
+            new SimpleEntry<>("ISBN",                    "9782505004509")
         }, map.entrySet().toArray());
     }
 }

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -36,9 +36,6 @@ import org.junit.Test;
 
 import static org.junit.Assert.*;
 
-// Branch-dependent imports
-import org.apache.sis.internal.jdk7.JDK7;
-
 
 /**
  * Verifies the API changes caused by the ISO 19115:2003 to ISO 19115:2014 upgrade.
@@ -94,7 +91,7 @@ public final strictfp class APIVerifier
     private void verifyAPI(final MetadataStandard standard, final Properties changes)
             throws ClassNotFoundException, NoSuchMethodException
     {
-        final Set<Method> classChanges = new HashSet<Method>();
+        final Set<Method> classChanges = new HashSet<>();
         for (final Map.Entry<Object,Object> entry : changes.entrySet()) {
             final Class<?> implementation = standard.getImplementation(Class.forName((String) entry.getKey()));
             for (final String change : (String[]) CharSequences.split((String) entry.getValue(), ' ')) {
@@ -154,20 +151,21 @@ public final strictfp class APIVerifier
      * @param  snapshotJAR Path to the JAR file of the GeoAPI interfaces that we would implement if it was released.
      * @param  unitsJAR    Path to the JAR file containing the {@code Unit} class. This is a GeoAPI dependency.
      * @param  out Where to write the API differences between {@code releasedJAR} and {@code snapshotJAR}.
-     * @throws Exception if an error occurred while processing the JAR file content.
+     * @throws ReflectiveOperationException if an error occurred while processing the JAR file content.
+     * @throws IOException if an error occurred while reading the JAR files or writing to {@code out}.
      */
     public static void listAPIChanges(final File releasedJAR, final File snapshotJAR, final File unitsJAR,
-            final Appendable out) throws Exception
+            final Appendable out) throws ReflectiveOperationException, IOException
     {
-        final String lineSeparator = JDK7.lineSeparator();
-        final Map<String,Boolean> methodChanges = new TreeMap<String,Boolean>();
-        final List<String> incompatibleChanges = new ArrayList<String>();
+        final String lineSeparator = System.lineSeparator();
+        final Map<String,Boolean> methodChanges = new TreeMap<>();
+        final List<String> incompatibleChanges = new ArrayList<>();
         final ClassLoader parent = APIVerifier.class.getClassLoader().getParent();
         final URL dependency = unitsJAR.toURI().toURL();
-        final JarFile newJARContent = new JarFile(snapshotJAR);
-        final URLClassLoader oldAPI = new URLClassLoader(new URL[] {releasedJAR.toURI().toURL(), dependency}, parent);
-        final URLClassLoader newAPI = new URLClassLoader(new URL[] {snapshotJAR.toURI().toURL(), dependency}, parent);
-        try {
+        try (final JarFile newJARContent = new JarFile(snapshotJAR);
+             final URLClassLoader oldAPI = new URLClassLoader(new URL[] {releasedJAR.toURI().toURL(), dependency}, parent);
+             final URLClassLoader newAPI = new URLClassLoader(new URL[] {snapshotJAR.toURI().toURL(), dependency}, parent))
+        {
             final Class<? extends Annotation> newUML = Class.forName("org.opengis.annotation.UML", false, newAPI).asSubclass(Annotation.class);
             final Method newIdentifier = newUML.getMethod("identifier", (Class[]) null);
             final Enumeration<JarEntry> entries = newJARContent.entries();
@@ -230,8 +228,6 @@ public final strictfp class APIVerifier
                     }
                 }
             }
-        } finally {
-            newJARContent.close();
         }
         if (!incompatibleChanges.isEmpty()) {
             out.append(lineSeparator)

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -223,17 +223,24 @@ public final strictfp class AllMetadataT
     @Override
     protected String getExpectedXmlElementName(final Class<?> enclosing, final UML uml) {
         String name = super.getExpectedXmlElementName(enclosing, uml);
-        /*switch (name)*/ {
-            if (name.equals("MD_Scope")) {      // ISO 19115:2014
+        switch (name) {
+            case "MD_Scope": {      // ISO 19115:2014
                 name = "DQ_Scope";  // ISO 19115:2003
-            } else if (name.equals("distributedComputingPlatform")) {
+                break;
+            }
+            case "distributedComputingPlatform": {
                 name = "DCP";
-            } else if (name.equals("stepDateTime")) {
+                break;
+            }
+            case "stepDateTime": {
                 name = "dateTime";
-            } else if (name.equals("locale")) {
+                break;
+            }
+            case "locale": {
                 if (enclosing == org.opengis.metadata.content.FeatureCatalogueDescription.class) {
                     name = "language";
                 }
+                break;
             }
         }
         return name;
@@ -268,19 +275,19 @@ public final strictfp class AllMetadataT
     @Override
     protected String getExpectedXmlTypeForElement(final Class<?> type, final Class<?> impl) {
         final String rootName = type.getAnnotation(UML.class).identifier();
-        /* switch (rootName) */ { // "String in switch" on the JDK7 branch.
+        switch (rootName) {
             // We don't know yet what is the type of this one.
-            if (rootName.equals("MD_FeatureTypeList")) {
+            case "MD_FeatureTypeList": {
                 return null;
             }
             // Following prefix was changed in ISO 19115 corrigendum,
             // but ISO 19139 still use the old prefix.
-            if (rootName.equals("SV_ServiceIdentification")) {
+            case "SV_ServiceIdentification": {
                 return "MD_ServiceIdentification_Type";
             }
             // Following prefix was changed in ISO 19115:2014,
             // but ISO 19139 still use the old prefix.
-            if (rootName.equals("MD_Scope")) {
+            case "MD_Scope": {
                 return "DQ_Scope_Type";
             }
         }

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -103,13 +103,13 @@ public final strictfp class CustomMetada
         final NameFactory factory = DefaultFactories.forBuildin(NameFactory.class);
         final DataIdentification identification = new DataIdentification() {
             @Override public InternationalString getAbstract() {
-                Map<Locale, String> names = new HashMap<Locale, String>();
+                Map<Locale, String> names = new HashMap<>();
                 names.put(Locale.ENGLISH, "Description");
                 return factory.createInternationalString(names);
             }
 
             @Override public InternationalString getEnvironmentDescription() {
-                Map<Locale, String> names = new HashMap<Locale, String>();
+                Map<Locale, String> names = new HashMap<>();
                 names.put(Locale.ENGLISH, "Environment");
                 return factory.createInternationalString(names);
             }

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -53,7 +53,7 @@ public final strictfp class ImmutableIde
      * Returns the properties map to be used in argument to test methods.
      */
     private static Map<String,Object> properties() {
-        final Map<String,Object> properties = new HashMap<String,Object>();
+        final Map<String,Object> properties = new HashMap<>();
         assertNull(properties.put(CODE_KEY,            "This is a code"));
         assertNull(properties.put(AUTHORITY_KEY,       "This is an authority"));
         assertNull(properties.put(VERSION_KEY,         "This is a version"));

Modified: sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java [UTF-8] (original)
+++ sis/trunk/core/sis-metadata/src/test/java/org/apache/sis/test/MetadataAssert.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -25,7 +25,6 @@ import org.apache.sis.io.wkt.WKTFormat;
 import org.apache.sis.io.wkt.Convention;
 
 // Branch-specific imports
-import org.apache.sis.internal.jdk7.JDK7;
 import org.apache.sis.metadata.iso.citation.DefaultCitation;
 import org.apache.sis.metadata.iso.citation.DefaultResponsibility;
 
@@ -151,7 +150,7 @@ public strictfp class MetadataAssert ext
                 WKT_FORMAT.setConvention(convention);
                 wkt = WKT_FORMAT.format(object);
             }
-            if (!wkt.matches(expected.replace("\n", JDK7.lineSeparator()))) {
+            if (!wkt.matches(expected.replace("\n", System.lineSeparator()))) {
                 fail("WKT does not match the expected regular expression. The WKT that we got is:\n" + wkt);
             }
         }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractDirectPosition.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -39,7 +39,7 @@ import static org.apache.sis.util.String
 import static org.apache.sis.util.ArgumentChecks.ensureDimensionMatches;
 
 // 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/geometry/AbstractEnvelope.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/AbstractEnvelope.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -47,7 +47,7 @@ import static org.apache.sis.math.MathFu
 import static org.apache.sis.math.MathFunctions.isPositive;
 
 // 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/geometry/ArrayEnvelope.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/ArrayEnvelope.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -41,7 +41,7 @@ import static org.apache.sis.math.MathFu
 import static org.apache.sis.internal.referencing.Formulas.isPoleToPole;
 
 // 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/geometry/DirectPosition1D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition1D.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -31,7 +31,7 @@ import org.apache.sis.util.resources.Err
 import static org.apache.sis.util.ArgumentChecks.ensureDimensionMatches;
 
 // 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/geometry/DirectPosition2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -29,7 +29,7 @@ import static org.apache.sis.util.Argume
 import static org.apache.sis.util.ArgumentChecks.ensureDimensionMatches;
 
 // 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/geometry/Envelope2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -49,7 +49,7 @@ import static org.apache.sis.geometry.Ab
 import static org.apache.sis.geometry.AbstractEnvelope.isNegativeUnsafe;
 
 // 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/geometry/Envelopes.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -628,7 +628,7 @@ public final class Envelopes extends Sta
                     if (warning == null) {
                         warning = exception;
                     } else {
-                        // warning.addSuppressed(exception) on the JDK7 branch.
+                        warning.addSuppressed(exception);
                     }
                     continue;
                 }
@@ -706,7 +706,7 @@ public final class Envelopes extends Sta
                             if (warning == null) {
                                 warning = exception;
                             } else {
-                                // warning.addSuppressed(exception) on the JDK7 branch.
+                                warning.addSuppressed(exception);
                             }
                             continue;
                         }

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralDirectPosition.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -34,7 +34,7 @@ import org.apache.sis.util.resources.Err
 import static org.apache.sis.util.ArgumentChecks.ensureDimensionMatches;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk7.Objects;
+import java.util.Objects;
 
 
 /**
@@ -310,7 +310,7 @@ public class GeneralDirectPosition exten
             GeneralDirectPosition e = (GeneralDirectPosition) super.clone();
             field.set(e, ordinates.clone());
             return e;
-        } catch (Exception exception) { // (ReflectiveOperationException | CloneNotSupportedException) on JDK7
+        } catch (ReflectiveOperationException | CloneNotSupportedException exception) {
             // Should not happen, since we are cloneable.
             // Should not happen, since the "ordinates" field exists.
             // etc...

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/GeneralEnvelope.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -1037,7 +1037,7 @@ public class GeneralEnvelope extends Arr
             GeneralEnvelope e = (GeneralEnvelope) super.clone();
             field.set(e, ordinates.clone());
             return e;
-        } catch (Exception exception) { // (CloneNotSupportedException | ReflectiveOperationException) on JDK7
+        } catch (CloneNotSupportedException | ReflectiveOperationException exception) {
             // Should not happen, since we are cloneable, the
             // field is known to exist and we made it accessible.
             throw new AssertionError(exception);

Modified: sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java?rev=1762629&r1=1762628&r2=1762629&view=diff
==============================================================================
--- sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java [UTF-8] (original)
+++ sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java [UTF-8] Wed Sep 28 09:59:44 2016
@@ -492,6 +492,8 @@ public final class Shapes2D extends Stat
             } catch (TransformException exception) {
                 if (warning == null) {
                     warning = exception;
+                } else {
+                    warning.addSuppressed(exception);
                 }
                 continue;
             }
@@ -556,6 +558,8 @@ public final class Shapes2D extends Stat
                 } catch (TransformException exception) {
                     if (warning == null) {
                         warning = exception;
+                    } else {
+                        warning.addSuppressed(exception);
                     }
                     continue;
                 }



Mime
View raw message