sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1762787 [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-utility/s...
Date Thu, 29 Sep 2016 14:34:50 GMT
Author: desruisseaux
Date: Thu Sep 29 14:34:49 2016
New Revision: 1762787

URL: http://svn.apache.org/viewvc?rev=1762787&view=rev
Log:
Moved some resources that are specific to the sis-feature module into that module.
Some error messages were improved.

Added:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.java
      - copied, changed from r1762742, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources.properties
      - copied, changed from r1762742, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Resources_fr.properties
      - copied, changed from r1762742, sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
Modified:
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAssociation.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAttribute.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertySingleton.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/SparseFeature.java
    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/AttributeTypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
    sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/TypeBuilder.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
    sis/branches/JDK8/ide-project/NetBeans/build.xml

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractAssociation.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -23,7 +23,7 @@ import org.opengis.util.GenericName;
 import org.opengis.metadata.quality.DataQuality;
 import org.apache.sis.util.Debug;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.feature.Resources;
 
 // Branch-dependent imports
 import org.opengis.feature.Feature;
@@ -193,7 +193,7 @@ public abstract class AbstractAssociatio
     final void ensureValid(final FeatureType base, final FeatureType type) {
         if (base != type && !DefaultFeatureType.maybeAssignableFrom(base, type)) {
             throw new InvalidPropertyValueException(
-                    Errors.format(Errors.Keys.IllegalArgumentClass_3, getName(), base.getName(), type.getName()));
+                    Resources.format(Resources.Keys.IllegalFeatureType_3, getName(), base.getName(), type.getName()));
         }
     }
 

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -28,6 +28,7 @@ import org.apache.sis.util.resources.Err
 import org.apache.sis.util.collection.Containers;
 import org.apache.sis.util.CorruptedObjectException;
 import org.apache.sis.internal.util.CheckedArrayList;
+import org.apache.sis.internal.feature.Resources;
 
 // Branch-dependent imports
 import java.util.Objects;
@@ -41,6 +42,7 @@ import org.opengis.feature.Feature;
 import org.opengis.feature.FeatureType;
 import org.opengis.feature.FeatureAssociation;
 import org.opengis.feature.FeatureAssociationRole;
+import org.opengis.feature.IdentifiedType;
 import org.opengis.feature.Operation;
 
 
@@ -199,7 +201,7 @@ public abstract class AbstractFeature im
         final String name = property.getName().toString();
         verifyPropertyType(name, property);
         if (property instanceof Attribute<?> && !Containers.isNullOrEmpty(((Attribute<?>) property).characteristics())) {
-            throw new IllegalArgumentException(Errors.format(Errors.Keys.CanNotAssignCharacteristics_1, name));
+            throw new IllegalArgumentException(Resources.format(Resources.Keys.CanNotAssignCharacteristics_1, name));
         }
         setPropertyValue(name, property.getValue());
     }
@@ -286,7 +288,7 @@ public abstract class AbstractFeature im
             if (result != null) {
                 setPropertyValue(result, value);
             } else {
-                throw new IllegalStateException(Errors.format(Errors.Keys.CanNotSetPropertyValue_1, name));
+                throw new IllegalStateException(Resources.format(Resources.Keys.CanNotSetPropertyValue_1, name));
             }
         }
     }
@@ -436,7 +438,7 @@ public abstract class AbstractFeature im
                     } while ((element = it.next()) == null || base.isInstance(element));
                     // Found an illegal value. Exeption is thrown below.
                 }
-                throw illegalValueClass(attribute.getName(), element); // 'element' can not be null here.
+                throw illegalValueClass(pt, base, element);         // 'element' can not be null here.
             }
         }
         ((Attribute) attribute).setValue(value);
@@ -454,14 +456,14 @@ public abstract class AbstractFeature im
             if (value instanceof Feature) {
                 final FeatureType actual = ((Feature) value).getType();
                 if (base != actual && !DefaultFeatureType.maybeAssignableFrom(base, actual)) {
-                    throw illegalPropertyType(role.getName(), actual.getName());
+                    throw illegalFeatureType(role, base, actual);
                 }
             } else if (value instanceof Collection<?>) {
                 verifyAssociationValues(role, (Collection<?>) value);
                 association.setValues((Collection<? extends Feature>) value);
-                return; // Skip the setter at the end of this method.
+                return;                                 // Skip the setter at the end of this method.
             } else {
-                throw illegalValueClass(association.getName(), value);
+                throw illegalValueClass(role, Feature.class, value);
             }
         }
         association.setValue((Feature) value);
@@ -502,20 +504,20 @@ public abstract class AbstractFeature im
         } else if (property instanceof FeatureAssociation) {
             pt = ((FeatureAssociation) property).getRole();
         } else {
-            throw illegalPropertyType(base.getName(), property.getClass());
+            throw new InvalidPropertyValueException(Resources.format(Resources.Keys.IllegalPropertyType_2, base.getName(), property.getClass()));
         }
         if (pt != base) {
             if (base == null) {
-                throw new PropertyNotFoundException(Errors.format(Errors.Keys.PropertyNotFound_2, getName(), name));
+                throw new PropertyNotFoundException(Resources.format(Resources.Keys.PropertyNotFound_2, getName(), name));
             } else {
-                throw new InvalidPropertyValueException(Errors.format(Errors.Keys.MismatchedPropertyType_1, name));
+                throw new InvalidPropertyValueException(Resources.format(Resources.Keys.MismatchedPropertyType_1, name));
             }
         }
     }
 
     /**
-     * Verifies the validity of the given value for the property of the given name, then returns the value
-     * to store. The returned value is usually the same than the given one, except in the case of collections.
+     * Verifies the validity of the given value for the property of the given name, then returns the value to store.
+     * The returned value is usually the same than the given one, except in the case of collections.
      */
     final Object verifyPropertyValue(final String name, final Object value) {
         final PropertyType pt = type.getProperty(name);
@@ -551,7 +553,7 @@ public abstract class AbstractFeature im
         } else if (!isSingleton && value instanceof Collection<?>) {
             return CheckedArrayList.castOrCopy((Collection<?>) value, valueClass);
         } else {
-            throw illegalValueClass(type.getName(), value);
+            throw illegalValueClass(type, valueClass, value);
         }
     }
 
@@ -577,13 +579,13 @@ public abstract class AbstractFeature im
             if (base == valueType || DefaultFeatureType.maybeAssignableFrom(base, valueType)) {
                 return isSingleton ? value : singletonList(Feature.class, role.getMinimumOccurs(), value);
             } else {
-                throw illegalPropertyType(role.getName(), valueType.getName());
+                throw illegalFeatureType(role, base, valueType);
             }
         } else if (!isSingleton && value instanceof Collection<?>) {
             verifyAssociationValues(role, (Collection<?>) value);
             return CheckedArrayList.castOrCopy((Collection<?>) value, Feature.class);
         } else {
-            throw illegalValueClass(role.getName(), value);
+            throw illegalValueClass(role, Feature.class, value);
         }
     }
 
@@ -596,11 +598,11 @@ public abstract class AbstractFeature im
         for (final Object value : values) {
             ArgumentChecks.ensureNonNullElement("values", index, value);
             if (!(value instanceof Feature)) {
-                throw illegalValueClass(role.getName(), value);
+                throw illegalValueClass(role, Feature.class, value);
             }
             final FeatureType type = ((Feature) value).getType();
             if (base != type && !DefaultFeatureType.maybeAssignableFrom(base, type)) {
-                throw illegalPropertyType(role.getName(), type.getName());
+                throw illegalFeatureType(role, base, type);
             }
             index++;
         }
@@ -613,7 +615,7 @@ public abstract class AbstractFeature im
     @SuppressWarnings("unchecked")
     private static <V> Collection<V> singletonList(final Class<V> valueClass, final int minimumOccurs, final Object value) {
         final CheckedArrayList<V> values = new CheckedArrayList<>(valueClass, Math.max(minimumOccurs, 4));
-        values.add((V) value); // Type will be checked by CheckedArrayList.
+        values.add((V) value);                              // Type will be checked by CheckedArrayList.
         return values;
     }
 
@@ -623,23 +625,29 @@ public abstract class AbstractFeature im
      * but that property can not be stored in or extracted from a {@link Property} instance.
      */
     static IllegalArgumentException unsupportedPropertyType(final GenericName name) {
-        return new IllegalArgumentException(Errors.format(Errors.Keys.CanNotInstantiate_1, name));
+        return new IllegalArgumentException(Resources.format(Resources.Keys.CanNotInstantiateProperty_1, name));
     }
 
     /**
      * Returns the exception for a property value of wrong Java class.
      *
-     * @param value The value, which shall be non-null.
+     * @param  value  the value, which shall be non-null.
      */
-    private static ClassCastException illegalValueClass(final GenericName name, final Object value) {
-        return new ClassCastException(Errors.format(Errors.Keys.IllegalPropertyValueClass_2, name, value.getClass()));
+    private static ClassCastException illegalValueClass(
+            final IdentifiedType property, final Class<?> expected, final Object value)
+    {
+        return new ClassCastException(Resources.format(Resources.Keys.IllegalPropertyValueClass_3,
+                property.getName(), expected, value.getClass()));
     }
 
     /**
-     * Returns the exception for a property value (usually a feature) of wrong type.
+     * Returns the exception for an association value of wrong type.
      */
-    private static InvalidPropertyValueException illegalPropertyType(final GenericName name, final Object value) {
-        return new InvalidPropertyValueException(Errors.format(Errors.Keys.IllegalPropertyValueClass_2, name, value));
+    private static InvalidPropertyValueException illegalFeatureType(
+            final FeatureAssociationRole association, final FeatureType expected, final FeatureType actual)
+    {
+        return new InvalidPropertyValueException(Resources.format(Resources.Keys.IllegalFeatureType_3,
+                association.getName(), expected.getName(), actual.getName()));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/CharacteristicMap.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -19,10 +19,10 @@ package org.apache.sis.feature;
 import java.util.Map;
 import org.opengis.util.GenericName;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.Cloner;
 import org.apache.sis.internal.util.AbstractMap;
 import org.apache.sis.internal.util.AbstractMapEntry;
+import org.apache.sis.internal.feature.Resources;
 
 // Branch-dependent imports
 import org.opengis.feature.Attribute;
@@ -59,8 +59,8 @@ final class CharacteristicMap extends Ab
     /**
      * Creates an initially empty map of attribute characteristics.
      *
-     * @param source The attribute which is characterized by {@code characterizedBy}.
-     * @param characterizedBy Description of the characteristics of {@code source}.
+     * @param  source  the attribute which is characterized by {@code characterizedBy}.
+     * @param  characterizedBy  description of the characteristics of {@code source}.
      */
     CharacteristicMap(final Attribute<?> source, final CharacteristicTypeMap types) {
         this.source = source;
@@ -70,7 +70,7 @@ final class CharacteristicMap extends Ab
     /**
      * Returns a copy of this map. Characteristics are also cloned.
      *
-     * @return A copy of this map.
+     * @return a copy of this map.
      */
     @Override
     public CharacteristicMap clone() throws CloneNotSupportedException {
@@ -166,15 +166,16 @@ final class CharacteristicMap extends Ab
     /**
      * Returns the index for the characteristic of the given name.
      *
-     * @param  key The name for which to get the characteristic index.
-     * @return The index for the characteristic of the given name.
+     * @param  key  the name for which to get the characteristic index.
+     * @return the index for the characteristic of the given name.
      * @throws PropertyNotFoundException if the given key is not the name of a characteristic in this map.
      */
     private int indexOf(final String key) {
         ArgumentChecks.ensureNonNull("key", key);
         final Integer index = types.indices.get(key);
         if (index == null) {
-            throw new PropertyNotFoundException(Errors.format(Errors.Keys.PropertyNotFound_2, source.getName(), key));
+            throw new PropertyNotFoundException(Resources.format(
+                    Resources.Keys.CharacteristicsNotFound_2, source.getName(), key));
         }
         return index;
     }
@@ -184,8 +185,8 @@ final class CharacteristicMap extends Ab
      * If the given instance is not the expected one, then an {@link IllegalArgumentException}
      * will be thrown with an error message formatted using the name of expected and given types.
      *
-     * @param index Index of the expected attribute type.
-     * @param type  The actual attribute type.
+     * @param  index  index of the expected attribute type.
+     * @param  type   the actual attribute type.
      */
     final void verifyAttributeType(final int index, final AttributeType<?> type) {
         final AttributeType<?> expected = types.characterizedBy[index];
@@ -193,15 +194,15 @@ final class CharacteristicMap extends Ab
             final GenericName en = expected.getName();
             final GenericName an = type.getName();
             throw new InvalidPropertyValueException(String.valueOf(en).equals(String.valueOf(an))
-                    ? Errors.format(Errors.Keys.MismatchedPropertyType_1, en)
-                    : Errors.format(Errors.Keys.CanNotAssign_2, en.push(source.getName()), an));
+                    ? Resources.format(Resources.Keys.MismatchedPropertyType_1, en)
+                    : Resources.format(Resources.Keys.CanNotSetCharacteristics_2, en.push(source.getName()), an));
         }
     }
 
     /**
      * Sets the attribute characteristic for the given name.
      *
-     * @param  key The name of the characteristic to set.
+     * @param  key  the name of the characteristic to set.
      * @throws IllegalArgumentException if the given key is not the name of a characteristic in this map.
      */
     @Override
@@ -221,7 +222,7 @@ final class CharacteristicMap extends Ab
      * If no characteristic exists for the given name and that name is valid,
      * creates a new map entry with a default {@code Attribute} characteristic.
      *
-     * @param  name The name of the characteristic to create, if it does not already exist.
+     * @param  name  the name of the characteristic to create, if it does not already exist.
      * @return {@code true} if a new characteristic has been created for the given name.
      * @throws IllegalArgumentException if the given key is not the name of a characteristic in this map.
      */
@@ -241,7 +242,7 @@ final class CharacteristicMap extends Ab
     /**
      * Adds the given characteristic if none is currently associated for the same characteristic name.
      *
-     * @param  value The characteristic to add.
+     * @param  value  the characteristic to add.
      * @return {@code true} if the characteristic has been added.
      * @throws IllegalArgumentException if given characteristic is not valid for this map.
      * @throws IllegalStateException if another characteristic already exists for the characteristic name.
@@ -261,8 +262,8 @@ final class CharacteristicMap extends Ab
         } else if (previous.equals(value)) {
             return false;
         } else {
-            throw new IllegalStateException(Errors.format(
-                    Errors.Keys.PropertyAlreadyExists_2, source.getName(), value.getName()));
+            throw new IllegalStateException(Resources.format(
+                    Resources.Keys.CharacteristicsAlreadyExists_2, source.getName(), value.getName()));
         }
     }
 

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultAssociationRole.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -22,7 +22,7 @@ import java.util.ArrayList;
 import java.util.IdentityHashMap;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
-import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.feature.Resources;
 import org.apache.sis.util.Debug;
 
 import static org.apache.sis.util.ArgumentChecks.*;
@@ -356,7 +356,7 @@ public class DefaultAssociationRole exte
         if (type instanceof NamedFeatureType) {
             type = ((NamedFeatureType) type).resolved;
             if (type == null) {
-                throw new IllegalStateException(Errors.format(Errors.Keys.UnresolvedFeatureName_1, getName()));
+                throw new IllegalStateException(Resources.format(Resources.Keys.UnresolvedFeatureName_1, getName()));
             }
             valueType = type;
         }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DefaultFeatureType.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -34,10 +34,10 @@ import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.collection.Containers;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
+import org.apache.sis.internal.feature.Resources;
 
 // Branch-dependent imports
 import java.util.Objects;
@@ -261,7 +261,7 @@ public class DefaultFeatureType extends
             for (final FeatureType type : this.superTypes) {
                 if (type instanceof NamedFeatureType) {
                     // Hierarchy of feature types can not be cyclic.
-                    throw new IllegalArgumentException(Errors.format(Errors.Keys.UnresolvedFeatureName_1, type.getName()));
+                    throw new IllegalArgumentException(Resources.format(Resources.Keys.UnresolvedFeatureName_1, type.getName()));
                 }
             }
         }
@@ -291,7 +291,7 @@ public class DefaultFeatureType extends
             if (property instanceof AbstractOperation) {
                 for (final String dependency : ((AbstractOperation) property).getDependencies()) {
                     if (!byName.containsKey(dependency)) {
-                        throw new IllegalArgumentException(Errors.format(Errors.Keys.DependencyNotFound_3,
+                        throw new IllegalArgumentException(Resources.format(Resources.Keys.DependencyNotFound_3,
                                 property.getName(), dependency, super.getName()));
                     }
                 }
@@ -470,7 +470,7 @@ public class DefaultFeatureType extends
                     }
                 } else if (!isAssignableIgnoreName(previous, property)) {
                     final GenericName owner = ownerOf(this, sourceProperties, previous);
-                    throw new IllegalArgumentException(Errors.format(Errors.Keys.PropertyAlreadyExists_2,
+                    throw new IllegalArgumentException(Resources.format(Resources.Keys.PropertyAlreadyExists_2,
                             (owner != null) ? owner : "?", name));
                 }
             }
@@ -813,7 +813,7 @@ public class DefaultFeatureType extends
         if (pt != null) {
             return pt;
         }
-        throw new PropertyNotFoundException(Errors.format(Errors.Keys.PropertyNotFound_2, getName(), name));
+        throw new PropertyNotFoundException(Resources.format(Resources.Keys.PropertyNotFound_2, getName(), name));
     }
 
     /**
@@ -838,7 +838,7 @@ public class DefaultFeatureType extends
     @Override
     public Feature newInstance() throws FeatureInstantiationException {
         if (isAbstract) {
-            throw new FeatureInstantiationException(Errors.format(Errors.Keys.AbstractType_1, getName()));
+            throw new FeatureInstantiationException(Resources.format(Resources.Keys.AbstractFeatureType_1, getName()));
         }
         return isSparse ? new SparseFeature(this) : new DenseFeature(this);
     }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/DenseFeature.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -20,9 +20,9 @@ import java.util.Map;
 import java.util.Arrays;
 import org.opengis.metadata.maintenance.ScopeCode;
 import org.opengis.metadata.quality.DataQuality;
+import org.apache.sis.internal.feature.Resources;
 import org.apache.sis.internal.util.Cloner;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.util.resources.Errors;
 
 // Branch-dependent imports
 import org.opengis.feature.Property;
@@ -92,7 +92,7 @@ final class DenseFeature extends Abstrac
         if (index != null) {
             return index;
         }
-        throw new PropertyNotFoundException(Errors.format(Errors.Keys.PropertyNotFound_2, getName(), name));
+        throw new PropertyNotFoundException(Resources.format(Resources.Keys.PropertyNotFound_2, getName(), name));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -116,8 +116,8 @@ public class FeatureFormat extends Tabul
     /**
      * Creates a new formatter for the given locale and timezone.
      *
-     * @param locale   The locale, or {@code null} for {@code Locale.ROOT}.
-     * @param timezone The timezone, or {@code null} for UTC.
+     * @param  locale    the locale, or {@code null} for {@code Locale.ROOT}.
+     * @param  timezone  the timezone, or {@code null} for UTC.
      */
     public FeatureFormat(final Locale locale, final TimeZone timezone) {
         super(locale, timezone);
@@ -144,8 +144,8 @@ public class FeatureFormat extends Tabul
      *   <li>{@link java.util.Locale.Category#DISPLAY} specifies the locale to use for labels.</li>
      * </ul>
      *
-     * @param  category The category for which a locale is desired.
-     * @return The locale for the given category (never {@code null}).
+     * @param  category  the category for which a locale is desired.
+     * @return the locale for the given category (never {@code null}).
      */
     @Override
     public Locale getLocale(final Locale.Category category) {
@@ -169,7 +169,7 @@ public class FeatureFormat extends Tabul
      *   <li>{@link FeatureType}</li>
      * </ul>
      *
-     * @throws IOException If an error occurred while writing to the given appendable.
+     * @throws IOException if an error occurred while writing to the given appendable.
      */
     @Override
     public void format(final Object object, final Appendable toAppendTo) throws IOException {
@@ -462,7 +462,7 @@ header: for (int i=0; ; i++) {
      * Not yet supported.
      *
      * @return Currently never return.
-     * @throws ParseException Currently always thrown.
+     * @throws ParseException currently always thrown.
      */
     @Override
     public Object parse(final CharSequence text, final ParsePosition pos) throws ParseException {

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Features.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -25,9 +25,9 @@ import org.opengis.metadata.quality.Data
 import org.opengis.metadata.quality.Element;
 import org.opengis.metadata.quality.Result;
 import org.apache.sis.util.Static;
-import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.iso.DefaultNameFactory;
 import org.apache.sis.internal.system.DefaultFactories;
+import org.apache.sis.internal.feature.Resources;
 
 // Branch-dependent imports
 import org.opengis.feature.Attribute;
@@ -78,7 +78,7 @@ public final class Features extends Stat
             // We require a strict equality - not type.isAssignableFrom(actual) - because in
             // the later case we could have (to be strict) to return a <? extends V> type.
             if (!valueClass.equals(actual)) {
-                throw new ClassCastException(Errors.format(Errors.Keys.MismatchedValueClass_3,
+                throw new ClassCastException(Resources.format(Resources.Keys.MismatchedValueClass_3,
                         type.getName(), valueClass, actual));
             }
         }
@@ -107,7 +107,7 @@ public final class Features extends Stat
             // We require a strict equality - not type.isAssignableFrom(actual) - because in
             // the later case we could have (to be strict) to return a <? extends V> type.
             if (!valueClass.equals(actual)) {
-                throw new ClassCastException(Errors.format(Errors.Keys.MismatchedValueClass_3,
+                throw new ClassCastException(Resources.format(Resources.Keys.MismatchedValueClass_3,
                         attribute.getName(), valueClass, actual));
             }
         }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/Field.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -57,7 +57,7 @@ abstract class Field<V> implements Prope
     /**
      * Returns the field feature or attribute value, or {@code null} if none.
      *
-     * @return The feature or attribute value (may be {@code null}).
+     * @return the feature or attribute value (may be {@code null}).
      * @throws MultiValuedPropertyException if this field contains more than one value.
      *
      * @see AbstractFeature#getPropertyValue(String)
@@ -70,7 +70,7 @@ abstract class Field<V> implements Prope
      * The returned collection is <cite>live</cite>: changes in the returned collection
      * will be reflected immediately in this {@code Field} instance, and conversely.
      *
-     * @return The features or attribute values in a <cite>live</cite> collection.
+     * @return the features or attribute values in a <cite>live</cite> collection.
      */
     public Collection<V> getValues() {
         return new PropertySingleton<>(this);
@@ -79,7 +79,7 @@ abstract class Field<V> implements Prope
     /**
      * Sets the feature or attribute value. All previous values are replaced by the given singleton.
      *
-     * @param value The new value, or {@code null} for removing all values from this field.
+     * @param  value  the new value, or {@code null} for removing all values from this field.
      *
      * @see AbstractFeature#setPropertyValue(String, Object)
      */
@@ -91,7 +91,7 @@ abstract class Field<V> implements Prope
      * <p>The default implementation ensures that the given collection contains at most one element,
      * then delegates to {@link #setValue(Object)}.</p>
      *
-     * @param values The new values.
+     * @param  values  the new values.
      * @throws InvalidPropertyValueException if the given collection contains too many elements.
      */
     public void setValues(final Collection<? extends V> values) throws InvalidPropertyValueException {

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAssociation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAssociation.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAssociation.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAssociation.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -19,7 +19,7 @@ package org.apache.sis.feature;
 import java.util.Collection;
 import org.apache.sis.internal.util.CheckedArrayList;
 import org.apache.sis.util.ArgumentChecks;
-import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.feature.Resources;
 
 // Branch-dependent imports
 import org.opengis.feature.Feature;
@@ -97,7 +97,7 @@ final class MultiValuedAssociation exten
         switch (values.size()) {
             case 0:  return null;
             case 1:  return values.get(0);
-            default: throw new MultiValuedPropertyException(Errors.format(Errors.Keys.NotASingleton_1, getName()));
+            default: throw new MultiValuedPropertyException(Resources.format(Resources.Keys.NotASingleton_1, getName()));
         }
     }
 
@@ -109,6 +109,7 @@ final class MultiValuedAssociation exten
      * @return The features in a <cite>live</cite> collection.
      */
     @Override
+    @SuppressWarnings("ReturnOfCollectionOrArrayField")
     public Collection<Feature> getValues() {
         return values;
     }

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAttribute.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAttribute.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAttribute.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/MultiValuedAttribute.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -21,6 +21,7 @@ import org.apache.sis.internal.util.Chec
 import org.apache.sis.util.collection.CheckedContainer;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.feature.Resources;
 
 // Branch-dependent imports
 import org.opengis.feature.AttributeType;
@@ -67,7 +68,7 @@ final class MultiValuedAttribute<V> exte
      * Creates a new attribute of the given type initialized to the
      * {@linkplain DefaultAttributeType#getDefaultValue() default value}.
      *
-     * @param type Information about the attribute (base Java class, domain of values, <i>etc.</i>).
+     * @param  type  information about the attribute (base Java class, domain of values, <i>etc.</i>).
      */
     public MultiValuedAttribute(final AttributeType<V> type) {
         super(type);
@@ -82,8 +83,8 @@ final class MultiValuedAttribute<V> exte
      * Creates a new attribute of the given type initialized to the given values.
      * Note that a {@code null} value may not be the same as the default value.
      *
-     * @param type   Information about the attribute (base Java class, domain of values, <i>etc.</i>).
-     * @param values The initial values, or {@code null} for initializing to an empty list.
+     * @param  type    information about the attribute (base Java class, domain of values, <i>etc.</i>).
+     * @param  values  the initial values, or {@code null} for initializing to an empty list.
      */
     @SuppressWarnings("unchecked")
     MultiValuedAttribute(final AttributeType<V> type, final Object values) {
@@ -104,7 +105,7 @@ final class MultiValuedAttribute<V> exte
     /**
      * Returns the attribute value, or {@code null} if none.
      *
-     * @return The attribute value (may be {@code null}).
+     * @return the attribute value (may be {@code null}).
      * @throws MultiValuedPropertyException if this attribute contains more than one value.
      */
     @Override
@@ -112,7 +113,7 @@ final class MultiValuedAttribute<V> exte
         switch (values.size()) {
             case 0:  return null;
             case 1:  return values.get(0);
-            default: throw new MultiValuedPropertyException(Errors.format(Errors.Keys.NotASingleton_1, getName()));
+            default: throw new MultiValuedPropertyException(Resources.format(Resources.Keys.NotASingleton_1, getName()));
         }
     }
 
@@ -121,7 +122,7 @@ final class MultiValuedAttribute<V> exte
      * The returned collection is <cite>live</cite>: changes in the returned collection
      * will be reflected immediately in this {@code Attribute} instance, and conversely.
      *
-     * @return The attribute values in a <cite>live</cite> collection.
+     * @return the attribute values in a <cite>live</cite> collection.
      */
     @Override
     @SuppressWarnings("ReturnOfCollectionOrArrayField")
@@ -132,7 +133,7 @@ final class MultiValuedAttribute<V> exte
     /**
      * Sets the attribute value.
      *
-     * @param value The new value, or {@code null} for removing all values from this attribute.
+     * @param  value  the new value, or {@code null} for removing all values from this attribute.
      */
     @Override
     public void setValue(final V value) {
@@ -145,7 +146,7 @@ final class MultiValuedAttribute<V> exte
     /**
      * Sets the attribute values. All previous values are replaced by the given collection.
      *
-     * @param newValues The new values.
+     * @param  newValues  the new values.
      */
     @Override
     public void setValues(final Collection<? extends V> newValues) {
@@ -161,7 +162,7 @@ final class MultiValuedAttribute<V> exte
      * This implementation returns a <em>shallow</em> copy:
      * the attribute {@linkplain #getValues() values} are <strong>not</strong> cloned.
      *
-     * @return A clone of this attribute.
+     * @return a clone of this attribute.
      * @throws CloneNotSupportedException if this attribute can not be cloned.
      */
     @Override
@@ -175,7 +176,7 @@ final class MultiValuedAttribute<V> exte
     /**
      * Returns a hash code value for this attribute.
      *
-     * @return A hash code value.
+     * @return a hash code value.
      */
     @Override
     public int hashCode() {

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/NamedFeatureType.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -27,7 +27,7 @@ import org.opengis.feature.PropertyNotFo
 import org.opengis.feature.FeatureInstantiationException;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
-import org.apache.sis.util.resources.Errors;
+import org.apache.sis.internal.feature.Resources;
 
 
 /**
@@ -100,7 +100,7 @@ final class NamedFeatureType implements
      */
     @Override
     public PropertyType getProperty(final String name) throws PropertyNotFoundException {
-        throw new PropertyNotFoundException(Errors.format(Errors.Keys.PropertyNotFound_2, getName(), name));
+        throw new PropertyNotFoundException(Resources.format(Resources.Keys.PropertyNotFound_2, getName(), name));
     }
 
     /**
@@ -142,7 +142,7 @@ final class NamedFeatureType implements
      */
     @Override
     public Feature newInstance() throws FeatureInstantiationException {
-        throw new FeatureInstantiationException(Errors.format(Errors.Keys.UnresolvedFeatureName_1, getName()));
+        throw new FeatureInstantiationException(Resources.format(Resources.Keys.UnresolvedFeatureName_1, getName()));
     }
 
     /**

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertySingleton.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertySingleton.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertySingleton.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertySingleton.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -155,7 +155,7 @@ final class PropertySingleton<V> extends
      * Removes the singleton value, if presents.
      * This method is for {@link Iter#remove()} implementation only.
      *
-     * @param  c The expected {@link #modCount} value, for check against concurrent modification.
+     * @param  c  the expected {@link #modCount} value, for check against concurrent modification.
      */
     final void clear(final int c) {
         if (c != modCount) {

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/PropertyView.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -25,6 +25,7 @@ import org.apache.sis.util.collection.Ch
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.Debug;
+import org.apache.sis.internal.feature.Resources;
 
 // Branch-dependent imports
 import java.util.Objects;
@@ -120,7 +121,7 @@ abstract class PropertyView<V> extends F
             }
             value = it.next();
             if (it.hasNext()) {
-                throw new MultiValuedPropertyException(Errors.format(Errors.Keys.NotASingleton_1, name));
+                throw new MultiValuedPropertyException(Resources.format(Resources.Keys.NotASingleton_1, name));
             }
         }
         return getValueClass().cast(value);

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/SparseFeature.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/SparseFeature.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/SparseFeature.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/SparseFeature.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -21,10 +21,10 @@ import java.util.HashMap;
 import java.util.ConcurrentModificationException;
 import org.opengis.metadata.maintenance.ScopeCode;
 import org.opengis.metadata.quality.DataQuality;
+import org.apache.sis.internal.feature.Resources;
 import org.apache.sis.internal.util.Cloner;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.CorruptedObjectException;
-import org.apache.sis.util.resources.Errors;
 
 // Branch-dependent imports
 import java.util.Objects;
@@ -127,7 +127,7 @@ final class SparseFeature extends Abstra
         if (index != null) {
             return index;
         }
-        throw new PropertyNotFoundException(Errors.format(Errors.Keys.PropertyNotFound_2, getName(), name));
+        throw new PropertyNotFoundException(Resources.format(Resources.Keys.PropertyNotFound_2, getName(), name));
     }
 
     /**

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=1762787&r1=1762786&r2=1762787&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] Thu Sep 29 14:34:49 2016
@@ -24,6 +24,7 @@ import org.opengis.parameter.ParameterDe
 import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.util.GenericName;
 import org.apache.sis.internal.util.CollectionsExt;
+import org.apache.sis.internal.feature.Resources;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.util.ObjectConverters;
@@ -147,12 +148,12 @@ final class StringJoinOperation extends
             }
             if (!(attributeType instanceof AttributeType)) {
                 final Class<?>[] inf = Classes.getLeafInterfaces(Classes.getClass(attributeType), PropertyType.class);
-                throw new IllegalArgumentException(Errors.getResources(identification)
-                        .getString(Errors.Keys.IllegalPropertyType_2, name, (inf.length != 0) ? inf[0] : null));
+                throw new IllegalArgumentException(Resources.getResources(identification)
+                        .getString(Resources.Keys.IllegalPropertyType_2, name, (inf.length != 0) ? inf[0] : null));
             }
             if (((AttributeType<?>) attributeType).getMaximumOccurs() > 1) {
-                throw new IllegalArgumentException(Errors.getResources(identification)
-                        .getString(Errors.Keys.NotASingleton_1, name));
+                throw new IllegalArgumentException(Resources.getResources(identification)
+                        .getString(Resources.Keys.NotASingleton_1, name));
             }
             /*
              * StringJoinOperation does not need to keep the AttributeType references.
@@ -297,7 +298,7 @@ final class StringJoinOperation extends
                     throw e;
                 }
                 throw new UnconvertibleObjectException(Errors.format(
-                        Errors.Keys.IllegalPropertyValueClass_2, name, value.getClass(), e));
+                        Errors.Keys.IncompatiblePropertyValue_1, name), e);
             }
             return sb.append(suffix).toString();
         }
@@ -389,8 +390,8 @@ final class StringJoinOperation extends
              * in order to have a "all or nothing" behavior.
              */
             if (values.length != count) {
-                throw new InvalidPropertyValueException(
-                        Errors.format(Errors.Keys.UnexpectedNumberOfComponents_3, value, values.length, count));
+                throw new InvalidPropertyValueException(Resources.format(
+                        Resources.Keys.UnexpectedNumberOfComponents_4, getName(), value, values.length, count));
             }
             for (int i=0; i < values.length; i++) {
                 feature.setPropertyValue(attributeNames[i], values[i]);

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/AttributeTypeBuilder.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -32,6 +32,7 @@ import org.apache.sis.internal.util.SetO
 import org.apache.sis.internal.util.AbstractIterator;
 import org.apache.sis.internal.feature.AttributeConvention;
 import org.apache.sis.internal.feature.Geometries;
+import org.apache.sis.internal.feature.Resources;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.ObjectConverters;
@@ -597,7 +598,7 @@ public final class AttributeTypeBuilder<
                         throw new IllegalStateException(errors().getString(Errors.Keys.UnsupportedImplementation_1, valueClass));
                     }
                     if (owner.defaultGeometry != null) {
-                        throw new IllegalStateException(errors().getString(Errors.Keys.PropertyAlreadyExists_2,
+                        throw new IllegalStateException(resources().getString(Resources.Keys.PropertyAlreadyExists_2,
                                 owner.getDisplayName(), AttributeConvention.GEOMETRY_PROPERTY));
                     }
                     owner.defaultGeometry = this;

Modified: sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java?rev=1762787&r1=1762786&r2=1762787&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-feature/src/main/java/org/apache/sis/feature/builder/FeatureTypeBuilder.java [UTF-8] Thu Sep 29 14:34:49 2016
@@ -32,6 +32,7 @@ import org.apache.sis.feature.DefaultFea
 import org.apache.sis.feature.FeatureOperations;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.internal.feature.AttributeConvention;
+import org.apache.sis.internal.feature.Resources;
 import org.apache.sis.util.CorruptedObjectException;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ArraysExt;
@@ -747,7 +748,7 @@ public class FeatureTypeBuilder extends
                 }
                 if (AttributeConvention.IDENTIFIER_PROPERTY.equals(identifierTypes[0].getName())) {
                     if (identifierCursor > 1) {
-                        throw new IllegalStateException(Errors.format(Errors.Keys.PropertyAlreadyExists_2,
+                        throw new IllegalStateException(Resources.format(Resources.Keys.PropertyAlreadyExists_2,
                                 getDisplayName(), AttributeConvention.IDENTIFIER_PROPERTY));
                     }
                     System.arraycopy(propertyTypes, 1, propertyTypes, 0, --propertyCursor);

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=1762787&r1=1762786&r2=1762787&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] Thu Sep 29 14:34:49 2016
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.Locale;
 import org.opengis.util.ScopedName;
 import org.opengis.util.GenericName;
+import org.apache.sis.internal.feature.Resources;
 import org.apache.sis.feature.AbstractIdentifiedType;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.resources.Errors;
@@ -384,6 +385,13 @@ public abstract class TypeBuilder implem
     }
 
     /**
+     * Returns the {@code sis-feature} specific resources for error messages.
+     */
+    final Resources resources() {
+        return Resources.getResources(identification);
+    }
+
+    /**
      * Same as {@link org.apache.sis.util.ArgumentChecks#ensureNonNull(String, Object)},
      * but uses the current locale in case of error.
      *



Mime
View raw message