sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1763021 [1/3] - in /sis/branches/JDK8: core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-feature/src/main/java/org/apache/sis/feature/builder/ core/sis-feature/src/main/java/org/apache/sis/internal/feature/ core/sis-feature/s...
Date Sat, 01 Oct 2016 15:54:09 GMT
Author: desruisseaux
Date: Sat Oct  1 15:54:08 2016
New Revision: 1763021

URL: http://svn.apache.org/viewvc?rev=1763021&view=rev
Log:
Miscellaneous cleaning: javadoc fixes, rename Resources.getResources(…) as Resources.forLocale(…), more helpful error messages when the EPSG fallback ("EPSG-subset") does not find a code, add test for GenericNameMap.

Added:
    sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/GenericNameMapTest.java   (with props)
Modified:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java
    sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/filter/DefaultPropertyNameTest.java
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java
    sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.properties
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/SignReversalComment.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultCoordinateOperationFactory.java
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/StandardDefinitionsTest.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/CodeType.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameFactory.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Names.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary.properties
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Vocabulary_fr.properties
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/iso/NamesTest.java
    sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Resources.java
    sis/branches/JDK8/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GenericNameMap.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.java
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.properties
    sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources_fr.properties
    sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
    sis/branches/JDK8/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/gpx/GPXConstants.java

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/StringJoinOperation.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -148,11 +148,11 @@ final class StringJoinOperation extends
             }
             if (!(attributeType instanceof AttributeType)) {
                 final Class<?>[] inf = Classes.getLeafInterfaces(Classes.getClass(attributeType), PropertyType.class);
-                throw new IllegalArgumentException(Resources.getResources(identification)
+                throw new IllegalArgumentException(Resources.forProperties(identification)
                         .getString(Resources.Keys.IllegalPropertyType_2, name, (inf.length != 0) ? inf[0] : null));
             }
             if (((AttributeType<?>) attributeType).getMaximumOccurs() > 1) {
-                throw new IllegalArgumentException(Resources.getResources(identification)
+                throw new IllegalArgumentException(Resources.forProperties(identification)
                         .getString(Resources.Keys.NotASingleton_1, name));
             }
             /*

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -389,7 +389,7 @@ public abstract class TypeBuilder implem
      * Returns the {@code sis-feature} specific resources for error messages.
      */
     final Resources resources() {
-        return Resources.getResources(identification);
+        return Resources.forProperties(identification);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -181,7 +181,7 @@ public final class Resources extends Ind
      * @return resources in the given locale.
      * @throws MissingResourceException if resources can not be found.
      */
-    public static Resources getResources(final Locale locale) throws MissingResourceException {
+    public static Resources forLocale(final Locale locale) throws MissingResourceException {
         return getBundle(Resources.class, locale);
     }
 
@@ -196,8 +196,8 @@ public final class Resources extends Ind
      *
      * @since 0.4
      */
-    public static Resources getResources(final Map<?,?> properties) throws MissingResourceException {
-        return getResources(getLocale(properties));
+    public static Resources forProperties(final Map<?,?> properties) throws MissingResourceException {
+        return forLocale(getLocale(properties));
     }
 
     /**
@@ -208,7 +208,7 @@ public final class Resources extends Ind
      * @throws MissingResourceException if no object for the given key can be found.
      */
     public static String format(final short key) throws MissingResourceException {
-        return getResources((Locale) null).getString(key);
+        return forLocale(null).getString(key);
     }
 
     /**
@@ -223,7 +223,7 @@ public final class Resources extends Ind
     public static String format(final short  key,
                                 final Object arg0) throws MissingResourceException
     {
-        return getResources((Locale) null).getString(key, arg0);
+        return forLocale(null).getString(key, arg0);
     }
 
     /**
@@ -240,7 +240,7 @@ public final class Resources extends Ind
                                 final Object arg0,
                                 final Object arg1) throws MissingResourceException
     {
-        return getResources((Locale) null).getString(key, arg0, arg1);
+        return forLocale(null).getString(key, arg0, arg1);
     }
 
     /**
@@ -259,7 +259,7 @@ public final class Resources extends Ind
                                 final Object arg1,
                                 final Object arg2) throws MissingResourceException
     {
-        return getResources((Locale) null).getString(key, arg0, arg1, arg2);
+        return forLocale(null).getString(key, arg0, arg1, arg2);
     }
 
     /**
@@ -280,6 +280,6 @@ public final class Resources extends Ind
                                 final Object arg2,
                                 final Object arg3) throws MissingResourceException
     {
-        return getResources((Locale) null).getString(key, arg0, arg1, arg2, arg3);
+        return forLocale(null).getString(key, arg0, arg1, arg2, arg3);
     }
 }

Modified: sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/filter/DefaultPropertyNameTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/filter/DefaultPropertyNameTest.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/filter/DefaultPropertyNameTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/test/java/org/apache/sis/filter/DefaultPropertyNameTest.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -30,7 +30,7 @@ import static org.apache.sis.test.Assert
 /**
  * Tests {@link DefaultPropertyName}.
  *
- * @author Johann Sorel (Geomatys)
+ * @author  Johann Sorel (Geomatys)
  * @since   0.8
  * @version 0.8
  * @module
@@ -42,7 +42,7 @@ public final strictfp class DefaultPrope
     @Test
     public void testConstructor() {
         final FilterFactory2 FF = new DefaultFilterFactory();
-        assertNotNull(FF.property(Names.parseGenericName(null, ":", "type")));
+        assertNotNull(FF.property(Names.parseGenericName(null, null, "type")));
         assertNotNull(FF.property("type"));
     }
 

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameter.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -190,7 +190,7 @@ public final class ServiceParameter exte
                 if (valueClass != null) {
                     final String code = id.getCode();
                     if (code != null) {
-                        return Names.createMemberName(id.getCodeSpace(), ":", code, valueClass);
+                        return Names.createMemberName(id.getCodeSpace(), null, code, valueClass);
                     }
                 }
             }

Modified: sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -42,7 +42,7 @@ public final strictfp class ServiceParam
      * @return The test parameter.
      */
     public static ServiceParameter create() {
-        final MemberName paramName = Names.createMemberName(null, ":", "Version", String.class);
+        final MemberName paramName = Names.createMemberName(null, null, "Version", String.class);
         final ServiceParameter param = new ServiceParameter();
         param.memberName    = paramName;
         param.optionality   = true;

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -305,7 +305,13 @@ public final class Resources extends Ind
         public static final short NoConvergenceForPoints_2 = 39;
 
         /**
-         * No code “{2}” from authority “{0}” found for object of type ‘{1}’.
+         * No ‘{1}’ object found for code “{2}”. However only a subset of the {0} geodetic dataset has
+         * been queried. See {3} for instruction about how to install the full {0} database.
+         */
+        public static final short NoSuchAuthorityCodeInSubset_4 = 69;
+
+        /**
+         * No ‘{1}’ object found for code “{2}” in the “{0}” geodetic dataset.
          */
         public static final short NoSuchAuthorityCode_3 = 40;
 
@@ -443,7 +449,7 @@ public final class Resources extends Ind
      * @return resources in the given locale.
      * @throws MissingResourceException if resources can't be found.
      */
-    public static Resources getResources(final Locale locale) throws MissingResourceException {
+    public static Resources forLocale(final Locale locale) throws MissingResourceException {
         return getBundle(Resources.class, locale);
     }
 
@@ -456,8 +462,8 @@ public final class Resources extends Ind
      * @return resources in the given locale.
      * @throws MissingResourceException if resources can't be found.
      */
-    public static Resources getResources(final Map<?,?> properties) throws MissingResourceException {
-        return getResources(getLocale(properties));
+    public static Resources forProperties(final Map<?,?> properties) throws MissingResourceException {
+        return forLocale(getLocale(properties));
     }
 
     /**
@@ -468,7 +474,7 @@ public final class Resources extends Ind
      * @throws MissingResourceException if no object for the given key can be found.
      */
     public static String format(final short key) throws MissingResourceException {
-        return getResources((Locale) null).getString(key);
+        return forLocale(null).getString(key);
     }
 
     /**
@@ -483,7 +489,7 @@ public final class Resources extends Ind
     public static String format(final short  key,
                                 final Object arg0) throws MissingResourceException
     {
-        return getResources((Locale) null).getString(key, arg0);
+        return forLocale(null).getString(key, arg0);
     }
 
     /**
@@ -500,7 +506,7 @@ public final class Resources extends Ind
                                 final Object arg0,
                                 final Object arg1) throws MissingResourceException
     {
-        return getResources((Locale) null).getString(key, arg0, arg1);
+        return forLocale(null).getString(key, arg0, arg1);
     }
 
     /**
@@ -519,7 +525,7 @@ public final class Resources extends Ind
                                 final Object arg1,
                                 final Object arg2) throws MissingResourceException
     {
-        return getResources((Locale) null).getString(key, arg0, arg1, arg2);
+        return forLocale(null).getString(key, arg0, arg1, arg2);
     }
 
     /**
@@ -540,7 +546,7 @@ public final class Resources extends Ind
                                 final Object arg2,
                                 final Object arg3) throws MissingResourceException
     {
-        return getResources((Locale) null).getString(key, arg0, arg1, arg2, arg3);
+        return forLocale(null).getString(key, arg0, arg1, arg2, arg3);
     }
 
     /**
@@ -553,7 +559,7 @@ public final class Resources extends Ind
         International(short key, Object args)              {super(key, args);}
         @Override protected KeyConstants getKeyConstants() {return Keys.INSTANCE;}
         @Override protected IndexedResourceBundle getBundle(final Locale locale) {
-            return getResources(locale);
+            return forLocale(locale);
         }
     }
 

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.properties?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources.properties [ISO-8859-1] Sat Oct  1 15:54:08 2016
@@ -82,7 +82,8 @@ NonPerpendicularDirections_2      = Axis
 NonUniformScale                   = Scale is not uniform.
 NotAnAffineTransform              = Transform is not affine.
 NotASkewSymmetricMatrix           = Matrix is not skew-symmetric.
-NoSuchAuthorityCode_3             = No code \u201c{2}\u201d from authority \u201c{0}\u201d found for object of type \u2018{1}\u2019.
+NoSuchAuthorityCode_3             = No \u2018{1}\u2019 object found for code \u201c{2}\u201d in the \u201c{0}\u201d geodetic dataset.
+NoSuchAuthorityCodeInSubset_4     = No \u2018{1}\u2019 object found for code \u201c{2}\u201d. However only a subset of the {0} geodetic dataset has been queried. See {3} for instruction about how to install the full {0} database.
 NoSuchOperationMethod_1           = No operation method found for name or identifier \u201c{0}\u201d.
 ParameterNotFound_2               = No parameter named \u201c{1}\u201d has been found in \u201c{0}\u201d.
 RecursiveCreateCallForCode_2      = Recursive call while creating an object of type \u2018{0}\u2019 for code \u201c{1}\u201d.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties [ISO-8859-1] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Resources_fr.properties [ISO-8859-1] Sat Oct  1 15:54:08 2016
@@ -87,7 +87,8 @@ NonPerpendicularDirections_2      = Les
 NonUniformScale                   = L\u2019\u00e9chelle n\u2019est pas uniforme.
 NotAnAffineTransform              = La transformation n\u2019est pas affine.
 NotASkewSymmetricMatrix           = La matrice n\u2019est pas antisym\u00e9trique.
-NoSuchAuthorityCode_3             = Aucun code \u00ab\u202f{2}\u202f\u00bb de l\u2019autorit\u00e9 \u00ab\u202f{0}\u202f\u00bb n\u2019a \u00e9t\u00e9 trouv\u00e9 pour un objet de type \u2018{1}\u2019.
+NoSuchAuthorityCode_3             = Aucun objet de type \u2018{1}\u2019 n\u2019a \u00e9t\u00e9 trouv\u00e9 pour le code \u00ab\u202f{2}\u202f\u00bb dans la base de donn\u00e9es g\u00e9od\u00e9siques \u00ab\u202f{0}\u202f\u00bb.
+NoSuchAuthorityCodeInSubset_4     = Aucun objet de type \u2018{1}\u2019 n\u2019a \u00e9t\u00e9 trouv\u00e9 pour le code \u00ab\u202f{2}\u202f\u00bb. Toutefois seul un sous-ensemble de la base de donn\u00e9es g\u00e9od\u00e9siques {0} a \u00e9t\u00e9 interrog\u00e9. Voir {3} pour des instructions d'installation de la base de donn\u00e9es {0} compl\u00e8te.
 NoSuchOperationMethod_1           = Aucune m\u00e9thode n\u2019a \u00e9t\u00e9 trouv\u00e9e pour le nom ou l\u2019identifiant \u00ab\u202f{0}\u202f\u00bb.
 ParameterNotFound_2               = Aucun param\u00e8tre nomm\u00e9 \u00ab\u202f{1}\u202f\u00bb n\u2019a \u00e9t\u00e9 trouv\u00e9 dans \u00ab\u202f{0}\u202f\u00bb.
 RecursiveCreateCallForCode_2      = Appels r\u00e9cursifs lors de la cr\u00e9ation d\u2019un objet de type \u2018{0}\u2019 pour le code \u00ab\u202f{1}\u202f\u00bb.

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/SignReversalComment.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/SignReversalComment.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/SignReversalComment.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/SignReversalComment.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -72,7 +72,7 @@ public final class SignReversalComment e
      */
     @Override
     public String toString(final Locale locale) {
-        return Resources.getResources(locale).getString(opposite
+        return Resources.forLocale(locale).getString(opposite
                 ? Resources.Keys.InverseOperationUsesOppositeSign
                 : Resources.Keys.InverseOperationUsesSameSign);
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/DatumShiftGridLoader.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.internal.referencing.provider;
 
-import java.util.Locale;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
 import java.io.EOFException;
@@ -147,7 +146,7 @@ class DatumShiftGridLoader {
      * @param file   The grid file, as a {@link String} or a {@link Path}.
      */
     static void log(final Class<?> caller, final Object file) {
-        final LogRecord record = Resources.getResources((Locale) null).getLogRecord(Level.FINE, Resources.Keys.LoadingDatumShiftFile_1, file);
+        final LogRecord record = Resources.forLocale(null).getLogRecord(Level.FINE, Resources.Keys.LoadingDatumShiftFile_1, file);
         record.setLoggerName(Loggers.COORDINATE_OPERATION);
         Logging.log(caller, "createMathTransform", record);
     }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/DefaultParameterDescriptorGroup.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -216,7 +216,7 @@ public class DefaultParameterDescriptorG
             final String name = parameter.getName().getCode();
             for (int j=0; j<i; j++) {
                 if (IdentifiedObjects.isHeuristicMatchForName(parameters[j], name)) {
-                    throw new InvalidParameterNameException(Resources.getResources(properties).getString(
+                    throw new InvalidParameterNameException(Resources.forProperties(properties).getString(
                             Resources.Keys.DuplicatedParameterName_4, Verifier.getDisplayName(parameters[j]), j, name, i),
                             name);
                 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/parameter/Verifier.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -353,7 +353,7 @@ final class Verifier {
         if (needsValue) {
             arguments[arguments.length - 1] = value;
         }
-        return (internal ? Resources.getResources(properties) : Errors.getResources(properties)).getString(errorKey, arguments);
+        return (internal ? Resources.forProperties(properties) : Errors.getResources(properties)).getString(errorKey, arguments);
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -371,11 +371,11 @@ public enum CommonCRS {
     /**
      * Creates a new constant for the given EPSG or SIS codes.
      *
-     * @param geographic The EPSG code for the two-dimensional geographic CRS.
-     * @param geo3D      The EPSG code of the three-dimensional geographic CRS, or 0 if none.
-     * @param geocentric The EPSG code of the geocentric CRS, or 0 if none.
-     * @param datum      The EPSG code for the datum.
-     * @param ellipsoid  The EPSG code for the ellipsoid.
+     * @param geographic  the EPSG code for the two-dimensional geographic CRS.
+     * @param geo3D       the EPSG code of the three-dimensional geographic CRS, or 0 if none.
+     * @param geocentric  the EPSG code of the geocentric CRS, or 0 if none.
+     * @param datum       the EPSG code for the datum.
+     * @param ellipsoid   the EPSG code for the ellipsoid.
      */
     private CommonCRS(final short geographic, final short geo3D, final short geocentric, final short datum, final short ellipsoid,
             final short northUTM, final short southUTM, final byte firstZone, final byte lastZone)
@@ -441,7 +441,7 @@ public enum CommonCRS {
      * Since ISO 19115 {@link org.opengis.metadata.extent.GeographicBoundingBox} is approximative by definition,
      * their datum can be arbitrary.
      *
-     * @return The default two-dimensional geographic CRS with (<var>longitude</var>, <var>latitude</var>) axis order.
+     * @return the default two-dimensional geographic CRS with (<var>longitude</var>, <var>latitude</var>) axis order.
      */
     public static GeographicCRS defaultGeographic() {
         return DEFAULT.normalizedGeographic();
@@ -466,7 +466,7 @@ public enum CommonCRS {
      *   <tr><td>WGS 84</td>                   <td>{@link #WGS84}</td>  <td>CRS:84</td></tr>
      * </table></blockquote>
      *
-     * @return The geographic CRS with non-standard (<var>longitude</var>, <var>latitude</var>) axis order.
+     * @return the geographic CRS with non-standard (<var>longitude</var>, <var>latitude</var>) axis order.
      *
      * @see CRS#forCode(String)
      * @see DefaultGeographicCRS#forConvention(AxesConvention)
@@ -506,7 +506,7 @@ public enum CommonCRS {
      *   <tr><td>WGS 84</td>                   <td>{@link #WGS84}</td>  <td>4326</td></tr>
      * </table></blockquote>
      *
-     * @return The geographic CRS with standard (<var>latitude</var>, <var>longitude</var>) axis order.
+     * @return the geographic CRS with standard (<var>latitude</var>, <var>longitude</var>) axis order.
      *
      * @see CRS#forCode(String)
      * @see DefaultGeographicCRS
@@ -561,7 +561,7 @@ public enum CommonCRS {
      *   <tr><td>WGS 84</td>                   <td>{@link #WGS84}</td>  <td>4979</td></tr>
      * </table></blockquote>
      *
-     * @return The three-dimensional geographic CRS associated to this enum.
+     * @return the three-dimensional geographic CRS associated to this enum.
      *
      * @see CRS#forCode(String)
      * @see DefaultGeographicCRS
@@ -619,7 +619,7 @@ public enum CommonCRS {
      *   <tr><td>WGS 84</td>                   <td>{@link #WGS84}</td>  <td>4978</td></tr>
      * </table></blockquote>
      *
-     * @return The geocentric CRS associated to this enum.
+     * @return the geocentric CRS associated to this enum.
      *
      * @see CRS#forCode(String)
      * @see DefaultGeocentricCRS
@@ -669,7 +669,7 @@ public enum CommonCRS {
      *   <li>Geocentric radius in metres oriented toward {@linkplain AxisDirection#UP up}.</li>
      * </ol>
      *
-     * @return The geocentric CRS associated to this enum.
+     * @return the geocentric CRS associated to this enum.
      *
      * @see DefaultGeocentricCRS
      *
@@ -727,7 +727,7 @@ public enum CommonCRS {
      *   <tr><td>World Geodetic System 1984</td>                        <td>{@link #WGS84}</td>  <td>6326</td></tr>
      * </table></blockquote>
      *
-     * @return The geodetic datum associated to this enum.
+     * @return the geodetic datum associated to this enum.
      *
      * @see org.apache.sis.referencing.datum.DefaultGeodeticDatum
      */
@@ -768,7 +768,7 @@ public enum CommonCRS {
      *   <tr><td>World Geodetic System (WGS) 1984</td> <td>{@link #WGS84}</td>  <td>7030</td></tr>
      * </table></blockquote>
      *
-     * @return The ellipsoid associated to this enum.
+     * @return the ellipsoid associated to this enum.
      *
      * @see org.apache.sis.referencing.datum.DefaultEllipsoid
      */
@@ -808,7 +808,7 @@ public enum CommonCRS {
      *   <tr><td>Greenwich</td>     <td>{@link #WGS84}</td> <td>8901</td></tr>
      * </table></blockquote>
      *
-     * @return The prime meridian associated to this enum.
+     * @return the prime meridian associated to this enum.
      *
      * @see org.apache.sis.referencing.datum.DefaultPrimeMeridian
      */
@@ -826,7 +826,7 @@ public enum CommonCRS {
                             cached = object = factory.createPrimeMeridian(StandardDefinitions.GREENWICH);
                             return object;
                         } catch (FactoryException e) {
-                            failure(this, "primeMeridian", e, (short) 8901);
+                            failure(this, "primeMeridian", e, Constants.EPSG_GREENWICH);
                         }
                         object = StandardDefinitions.primeMeridian();
                     }
@@ -922,9 +922,9 @@ public enum CommonCRS {
      *
      * The coordinate system axes are (Easting, Northing) in metres.
      *
-     * @param  latitude  A latitude in the desired UTM projection zone.
-     * @param  longitude A longitude in the desired UTM projection zone.
-     * @return A Universal Transverse Mercator projection for the zone containing the given point.
+     * @param  latitude  a latitude in the desired UTM projection zone.
+     * @param  longitude a longitude in the desired UTM projection zone.
+     * @return a Universal Transverse Mercator projection for the zone containing the given point.
      *
      * @since 0.7
      */
@@ -1182,7 +1182,7 @@ public enum CommonCRS {
          *   <tr><td>Other surface</td>             <td>{@link #OTHER_SURFACE}</td>      <td></td></tr>
          * </table></blockquote>
          *
-         * @return The CRS associated to this enum.
+         * @return the CRS associated to this enum.
          *
          * @see DefaultVerticalCRS
          */
@@ -1247,7 +1247,7 @@ public enum CommonCRS {
          *   <tr><td>Other surface</td>             <td>{@link #OTHER_SURFACE}</td>      <td></td></tr>
          * </table></blockquote>
          *
-         * @return The datum associated to this enum.
+         * @return the datum associated to this enum.
          *
          * @see DefaultVerticalDatum
          */
@@ -1430,7 +1430,7 @@ public enum CommonCRS {
          *   <tr><td>Unix/POSIX or Java</td> <td>{@link #UNIX}</td></tr>
          * </table></blockquote>
          *
-         * @return The CRS associated to this enum.
+         * @return the CRS associated to this enum.
          *
          * @see DefaultTemporalCRS
          */
@@ -1499,7 +1499,7 @@ public enum CommonCRS {
          *   <tr><td>Unix/POSIX or Java</td> <td>{@link #UNIX}</td></tr>
          * </table></blockquote>
          *
-         * @return The datum associated to this enum.
+         * @return the datum associated to this enum.
          *
          * @see DefaultTemporalDatum
          */
@@ -1552,8 +1552,8 @@ public enum CommonCRS {
     /**
      * Puts the name for the given key in a map of properties to be given to object constructors.
      *
-     * @param  key A constant from {@link org.apache.sis.util.resources.Vocabulary.Keys}.
-     * @return The properties to give to the object constructor.
+     * @param  key  a constant from {@link org.apache.sis.util.resources.Vocabulary.Keys}.
+     * @return the properties to give to the object constructor.
      */
     static Map<String,?> properties(final short key) {
         return properties(Vocabulary.formatInternational(key));

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/EPSGFactoryFallback.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -19,7 +19,6 @@ package org.apache.sis.referencing;
 import java.util.Collections;
 import java.util.Set;
 import java.util.LinkedHashSet;
-import java.util.Locale;
 import org.opengis.referencing.IdentifiedObject;
 import org.opengis.referencing.NoSuchAuthorityCodeException;
 import org.opengis.referencing.datum.DatumAuthorityFactory;
@@ -42,7 +41,7 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.referencing.Resources;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.util.Fallback;
-import org.apache.sis.util.iso.SimpleInternationalString;
+import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.iso.DefaultNameSpace;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Debug;
@@ -79,6 +78,11 @@ final class EPSGFactoryFallback extends
     private static final int CRS = 1, DATUM = 2, ELLIPSOID = 4, PRIME_MERIDIAN = 8;
 
     /**
+     * The authority to report in exceptions. Not necessarily the same than the {@link #authority} title.
+     */
+    private static final String AUTHORITY = Constants.EPSG + "-subset";
+
+    /**
      * The authority, created when first needed.
      */
     private Citation authority;
@@ -97,7 +101,7 @@ final class EPSGFactoryFallback extends
     public synchronized Citation getAuthority() {
         if (authority == null) {
             final DefaultCitation c = new DefaultCitation(Citations.EPSG);
-            c.setTitle(new SimpleInternationalString("Subset of " + c.getTitle().toString(Locale.ENGLISH)));
+            c.setTitle(Vocabulary.formatInternational(Vocabulary.Keys.SubsetOf_1, c.getTitle()));
             authority = c;
         }
         return authority;
@@ -206,7 +210,7 @@ final class EPSGFactoryFallback extends
     }
 
     /**
-     * Implementation of the {@code createFoo(String)} methods.
+     * Implementation of all {@code createFoo(String)} methods in this fallback class.
      *
      * @param  code  the EPSG code.
      * @param  kind  any combination of {@link #CRS}, {@link #DATUM}, {@link #ELLIPSOID} or {@link #PRIME_MERIDIAN} bits.
@@ -214,7 +218,6 @@ final class EPSGFactoryFallback extends
      * @throws NoSuchAuthorityCodeException if no matching object has been found.
      */
     private IdentifiedObject predefined(String code, final int kind) throws NoSuchAuthorityCodeException {
-        NumberFormatException cause = null;
         try {
             /*
              * Parse the value after the last ':'. We do not bother to verify if the part before ':' is legal
@@ -225,7 +228,7 @@ final class EPSGFactoryFallback extends
              */
             code = CharSequences.trimWhitespaces(code, code.lastIndexOf(DefaultNameSpace.DEFAULT_SEPARATOR) + 1, code.length()).toString();
             final int n = Integer.parseInt(code);
-            if ((kind & PRIME_MERIDIAN) != 0  &&  n == 8901) {
+            if ((kind & PRIME_MERIDIAN) != 0  &&  n == Constants.EPSG_GREENWICH) {
                 return CommonCRS.WGS84.primeMeridian();
             }
             for (final CommonCRS crs : CommonCRS.values()) {
@@ -260,21 +263,27 @@ final class EPSGFactoryFallback extends
                     }
                 }
             }
-        } catch (NumberFormatException e) {
-            cause = e;
+        } catch (NumberFormatException cause) {
+            final NoSuchAuthorityCodeException e = new NoSuchAuthorityCodeException(Resources.format(
+                    Resources.Keys.NoSuchAuthorityCode_3, Constants.EPSG, toClass(kind), code), AUTHORITY, code);
+            e.initCause(cause);
+            throw e;
         }
-        final Class<?> type;
+        throw new NoSuchAuthorityCodeException(Resources.format(Resources.Keys.NoSuchAuthorityCodeInSubset_4,
+                Constants.EPSG, toClass(kind), code, "http://sis.apache.org/epsg.html"), AUTHORITY, code);
+    }
+
+    /**
+     * Returns the interface for the given {@link #CRS}, {@link #DATUM}, {@link #ELLIPSOID} or {@link #PRIME_MERIDIAN}
+     * constant. This is used for formatting error message only.
+     */
+    private static Class<?> toClass(final int kind) {
         switch (kind) {
-            case CRS:            type = CoordinateReferenceSystem.class; break;
-            case DATUM:          type = Datum.class; break;
-            case ELLIPSOID:      type = Ellipsoid.class; break;
-            case PRIME_MERIDIAN: type = PrimeMeridian.class; break;
-            default:             type = IdentifiedObject.class; break;
+            case CRS:            return CoordinateReferenceSystem.class;
+            case DATUM:          return Datum.class;
+            case ELLIPSOID:      return Ellipsoid.class;
+            case PRIME_MERIDIAN: return PrimeMeridian.class;
+            default:             return IdentifiedObject.class;
         }
-        final String authority = Constants.EPSG + "-subset";
-        final NoSuchAuthorityCodeException e = new NoSuchAuthorityCodeException(Resources.format(
-                Resources.Keys.NoSuchAuthorityCode_3, authority, type, code), authority, code);
-        e.initCause(cause);
-        throw e;
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/StandardDefinitions.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -82,6 +82,8 @@ import static org.apache.sis.internal.me
 final class StandardDefinitions {
     /**
      * The EPSG code for Greenwich meridian.
+     *
+     * @see org.apache.sis.internal.util.Constants#EPSG_GREENWICH
      */
     static final String GREENWICH = "8901";
 
@@ -94,11 +96,11 @@ final class StandardDefinitions {
     /**
      * Returns a map of properties for the given EPSG code, name and alias.
      *
-     * @param  code  The EPSG code, or 0 if none.
-     * @param  name  The object name.
-     * @param  alias The alias, or {@code null} if none.
-     * @param  world {@code true} if the properties shall have an entry for the domain of validity.
-     * @return The map of properties to give to constructors or factory methods.
+     * @param  code   the EPSG code, or 0 if none.
+     * @param  name   the object name.
+     * @param  alias  the alias, or {@code null} if none.
+     * @param  world  {@code true} if the properties shall have an entry for the domain of validity.
+     * @return the map of properties to give to constructors or factory methods.
      */
     private static Map<String,Object> properties(final int code, final String name, final String alias, final boolean world) {
         final Map<String,Object> map = new HashMap<>(8);
@@ -129,11 +131,11 @@ final class StandardDefinitions {
      * This method restricts the factory to SIS implementation instead than arbitrary factory in order to meet
      * the contract saying that {@link CommonCRS} methods should never fail.
      *
-     * @param code       The EPSG code, or 0 if none.
-     * @param baseCRS    The geographic CRS on which the projected CRS is based.
-     * @param latitude   A latitude in the zone of the desired projection, to be snapped to 0°.
-     * @param longitude  A longitude in the zone of the desired projection, to be snapped to UTM central meridian.
-     * @param derivedCS  The projected coordinate system.
+     * @param code       the EPSG code, or 0 if none.
+     * @param baseCRS    the geographic CRS on which the projected CRS is based.
+     * @param latitude   a latitude in the zone of the desired projection, to be snapped to 0°.
+     * @param longitude  a longitude in the zone of the desired projection, to be snapped to UTM central meridian.
+     * @param derivedCS  the projected coordinate system.
      */
     static ProjectedCRS createUTM(final int code, final GeographicCRS baseCRS,
             final double latitude, final double longitude, final CartesianCS derivedCS)
@@ -157,10 +159,10 @@ final class StandardDefinitions {
     /**
      * Creates a geodetic CRS from hard-coded values for the given code.
      *
-     * @param  code  The EPSG code.
-     * @param  datum The geodetic datum.
-     * @param  cs    The coordinate system.
-     * @return The geographic CRS for the given code.
+     * @param  code   the EPSG code.
+     * @param  datum  the geodetic datum.
+     * @param  cs     the coordinate system.
+     * @return the geographic CRS for the given code.
      */
     static GeographicCRS createGeographicCRS(final short code, final GeodeticDatum datum, final EllipsoidalCS cs) {
         final String name;
@@ -185,10 +187,10 @@ final class StandardDefinitions {
     /**
      * Creates a geodetic datum from hard-coded values for the given code.
      *
-     * @param  code      The EPSG code.
-     * @param  ellipsoid The datum ellipsoid.
-     * @param  meridian  The datum prime meridian.
-     * @return The geodetic datum for the given code.
+     * @param  code       the EPSG code.
+     * @param  ellipsoid  the datum ellipsoid.
+     * @param  meridian   the datum prime meridian.
+     * @return the geodetic datum for the given code.
      */
     static GeodeticDatum createGeodeticDatum(final short code, final Ellipsoid ellipsoid, final PrimeMeridian meridian) {
         final String name;
@@ -210,8 +212,8 @@ final class StandardDefinitions {
     /**
      * Creates an ellipsoid from hard-coded values for the given code.
      *
-     * @param  code The EPSG code.
-     * @return The ellipsoid for the given code.
+     * @param  code  the EPSG code.
+     * @return the ellipsoid for the given code.
      */
     static Ellipsoid createEllipsoid(final short code) {
         String  name;          // No default value
@@ -251,9 +253,9 @@ final class StandardDefinitions {
     /**
      * Creates a vertical CRS from hard-coded values for the given code.
      *
-     * @param  code  The EPSG code.
-     * @param  datum The vertical datum.
-     * @return The vertical CRS for the given code.
+     * @param  code   the EPSG code.
+     * @param  datum  the vertical datum.
+     * @return the vertical CRS for the given code.
      */
     static VerticalCRS createVerticalCRS(final short code, final VerticalDatum datum) {
         String cs   = "Vertical CS. Axis: height (H).";   // Default coordinate system
@@ -287,8 +289,8 @@ final class StandardDefinitions {
     /**
      * Creates a vertical datum from hard-coded values for the given code.
      *
-     * @param  code The EPSG code.
-     * @return The vertical datum for the given code.
+     * @param  code  the EPSG code.
+     * @return the vertical datum for the given code.
      */
     static VerticalDatum createVerticalDatum(final short code) {
         final String name;
@@ -306,8 +308,8 @@ final class StandardDefinitions {
      * The coordinate system names used by this method contains only the first
      * part of the names declared in the EPSG database.
      *
-     * @param  code The EPSG code.
-     * @return The coordinate system for the given code.
+     * @param  code  the EPSG code.
+     * @return the coordinate system for the given code.
      */
     @SuppressWarnings("fallthrough")
     static CoordinateSystem createCoordinateSystem(final short code) {
@@ -353,8 +355,8 @@ final class StandardDefinitions {
     /**
      * Creates an axis from hard-coded values for the given code.
      *
-     * @param  code The EPSG code.
-     * @return The coordinate system axis for the given code.
+     * @param  code  the EPSG code.
+     * @return the coordinate system axis for the given code.
      */
     static CoordinateSystemAxis createAxis(final short code) {
         final String name, abrv;

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -176,11 +176,11 @@ public class AbstractCS extends Abstract
              */
             switch (validateAxis(direction, unit)) {
                 case INVALID_DIRECTION: {
-                    throw new IllegalArgumentException(Resources.getResources(properties).getString(
+                    throw new IllegalArgumentException(Resources.forProperties(properties).getString(
                             Resources.Keys.IllegalAxisDirection_2, getClass(), direction));
                 }
                 case INVALID_UNIT: {
-                    throw new IllegalArgumentException(Resources.getResources(properties).getString(
+                    throw new IllegalArgumentException(Resources.forProperties(properties).getString(
                             Resources.Keys.IllegalUnitFor_2, name, unit));
                 }
             }
@@ -195,7 +195,7 @@ public class AbstractCS extends Abstract
                     final AxisDirection other = axes[j].getDirection();
                     final AxisDirection abs = AxisDirections.absolute(other);
                     if (dir.equals(abs) && !abs.equals(AxisDirection.FUTURE)) {
-                        throw new IllegalArgumentException(Resources.getResources(properties).getString(
+                        throw new IllegalArgumentException(Resources.forProperties(properties).getString(
                                 Resources.Keys.ColinearAxisDirections_2, direction, other));
                     }
                 }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -196,7 +196,7 @@ public class DefaultCartesianCS extends
                  * they are not really for Cartesian CS because we do not know the grid geometry.
                  */
                 if (angle != null && Math.abs(angle.degrees()) != 90) {
-                    throw new IllegalArgumentException(Resources.getResources(properties).getString(
+                    throw new IllegalArgumentException(Resources.forProperties(properties).getString(
                             Resources.Keys.NonPerpendicularDirections_2, axis0, axis1));
                 }
             }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -206,7 +206,7 @@ public class DefaultEllipsoidalCS extend
         while (--i >= 0) {
             final AxisDirection direction = super.getAxis(i).getDirection();
             if (AxisDirections.isVertical(direction) && --n < 0) {
-                throw new IllegalArgumentException(Resources.getResources(properties).getString(
+                throw new IllegalArgumentException(Resources.forProperties(properties).getString(
                         Resources.Keys.IllegalAxisDirection_2, EllipsoidalCS.class, direction));
             }
         }

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/AuthorityFactoryIdentifier.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -48,6 +48,12 @@ import java.util.Objects;
  */
 final class AuthorityFactoryIdentifier {
     /**
+     * The locale to use for identifiers. This is not necessarily the same locale
+     * than the one used for logging or error messages.
+     */
+    private static final Locale IDENTIFIER_LOCALE = Locale.US;
+
+    /**
      * Factory needed is {@link CRSAuthorityFactory}.
      */
     static final byte CRS = 0;
@@ -154,8 +160,8 @@ final class AuthorityFactoryIdentifier {
      * Only the version can be null.
      */
     static AuthorityFactoryIdentifier create(final byte type, final String authority, final String version) {
-        return new AuthorityFactoryIdentifier(type, authority.toUpperCase(Locale.US),
-                           (version == null) ? null : version.toLowerCase(Locale.US));
+        return new AuthorityFactoryIdentifier(type, authority.toUpperCase(IDENTIFIER_LOCALE),
+                           (version == null) ? null : version.toLowerCase(IDENTIFIER_LOCALE));
     }
 
     /**
@@ -166,20 +172,20 @@ final class AuthorityFactoryIdentifier {
         if (version == null && newAuthority.equals(authority)) {
             return this;
         }
-        return new AuthorityFactoryIdentifier(type, newAuthority.toUpperCase(Locale.US), null);
+        return new AuthorityFactoryIdentifier(type, newAuthority.toUpperCase(IDENTIFIER_LOCALE), null);
     }
 
     /**
      * Creates a new identifier for the same type and authority than this identifier, but a different version
      * extracted from the given authority.
      *
-     * @param  factory The factory's authority, or {@code null} for creating an identifier without version.
-     * @return An identifier for the version of the given authority, or {@code this} if the version is the same.
+     * @param  factory  the factory's authority, or {@code null} for creating an identifier without version.
+     * @return an identifier for the version of the given authority, or {@code this} if the version is the same.
      */
     AuthorityFactoryIdentifier versionOf(final Citation factory) {
         String newVersion = NameMeaning.getVersion(factory);
         if (newVersion != null) {
-            newVersion = newVersion.toLowerCase(Locale.US);
+            newVersion = newVersion.toLowerCase(IDENTIFIER_LOCALE);
         }
         if (Objects.equals(version, newVersion)) {
             return this;
@@ -258,10 +264,10 @@ final class AuthorityFactoryIdentifier {
      * and another factory, if this instance has not already logged a warning. This method assumes that it is invoked
      * by the {@code MultiAuthoritiesFactory.getAuthorityFactory(…)} method.
      *
-     * @param used The factory which will be used.
+     * @param  used  the factory which will be used.
      */
     void logConflict(final AuthorityFactory used) {
-        log(Resources.getResources((Locale) null).getLogRecord(Level.WARNING, Resources.Keys.IgnoredServiceProvider_3,
+        log(Resources.forLocale(null).getLogRecord(Level.WARNING, Resources.Keys.IgnoredServiceProvider_3,
                 TYPES[type], getAuthorityAndVersion(), Classes.getClass(used)));
     }
 
@@ -270,7 +276,7 @@ final class AuthorityFactoryIdentifier {
      * {@code AuthorityFactoryIdentifier} fallback on a default version.
      */
     void logFallback() {
-        log(Resources.getResources((Locale) null).getLogRecord(Level.WARNING, Resources.Keys.FallbackDefaultFactoryVersion_2,
+        log(Resources.forLocale(null).getLogRecord(Level.WARNING, Resources.Keys.FallbackDefaultFactoryVersion_2,
                 authority, version));
     }
 

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1763021&r1=1763020&r2=1763021&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java [UTF-8] Sat Oct  1 15:54:08 2016
@@ -31,7 +31,6 @@ import java.util.concurrent.ConcurrentMa
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.ConcurrentModificationException;
-import java.util.Locale;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
 import javax.measure.unit.Unit;
@@ -1453,7 +1452,7 @@ public class MultiAuthoritiesFactory ext
          * No coordinate operation because of mismatched factories. This is not illegal (the result is an empty set)
          * but it is worth to notify the user because this case has some chances to be an user error.
          */
-        final LogRecord record = Resources.getResources((Locale) null).getLogRecord(Level.WARNING,
+        final LogRecord record = Resources.forLocale(null).getLogRecord(Level.WARNING,
                 Resources.Keys.MismatchedOperationFactories_2, sourceCRS, targetCRS);
         record.setLoggerName(Loggers.CRS_FACTORY);
         Logging.log(MultiAuthoritiesFactory.class, "createFromCoordinateReferenceSystemCodes", record);



Mime
View raw message