Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java?rev=1739129&r1=1739128&r2=1739129&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/collection/Containers.java
 [UTF-8] Thu Apr 14 15:52:40 2016
@@ -244,7 +244,7 @@ public final class Containers extends St
         final Object value = properties.get(key);
         if (value != null && !type.isInstance(value)) {
             throw new IllegalArgumentException(Errors.getResources(properties)
-                    .getString(Errors.Keys.IllegalPropertyClass_2, key, 
value.getClass()));
+                    .getString(Errors.Keys.IllegalPropertyValueClass_3, key, 
type, value.getClass()));
         }
         return (T) value;
     }

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java?rev=1739129&r1=1739128&r2=1739129&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecord.java
 [UTF-8] Thu Apr 14 15:52:40 2016
@@ -255,8 +255,8 @@ public class DefaultRecord implements Re
         if (value != null) {
             final Class<?> valueClass = definition.getValueClass(index);
             if (valueClass != null && !valueClass.isInstance(value)) {
-                throw new 
ClassCastException(Errors.format(Errors.Keys.IllegalPropertyClass_2,
-                        name, value.getClass()));
+                throw new 
ClassCastException(Errors.format(Errors.Keys.IllegalPropertyValueClass_3,
+                        name, valueClass, value.getClass()));
             }
         }
         Array.set(values, index, value);
@@ -281,8 +281,8 @@ public class DefaultRecord implements Re
             if (value != null) {
                 final Class<?> valueClass = definition.getValueClass(i);
                 if (valueClass != null && !valueClass.isInstance(value)) {
-                    throw new 
ClassCastException(Errors.format(Errors.Keys.IllegalPropertyClass_2,
-                            definition.getName(i), value.getClass()));
+                    throw new 
ClassCastException(Errors.format(Errors.Keys.IllegalPropertyValueClass_3,
+                            definition.getName(i), valueClass, 
value.getClass()));
                 }
             }
             Array.set(values, i, value);

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java?rev=1739129&r1=1739128&r2=1739129&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/iso/Types.java
 [UTF-8] Thu Apr 14 15:52:40 2016
@@ -751,7 +751,7 @@ public final class Types extends Static
             if (value != null) {
                 if (!(value instanceof CharSequence)) {
                     throw new 
IllegalArgumentException(Errors.getResources(properties)
-                            .getString(Errors.Keys.IllegalPropertyClass_2, 
key, value.getClass()));
+                            
.getString(Errors.Keys.IllegalPropertyValueClass_2, key, value.getClass()));
                 }
                 if (i18n == null) {
                     i18n = (CharSequence) value;

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java?rev=1739129&r1=1739128&r2=1739129&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.java
 [UTF-8] Thu Apr 14 15:52:40 2016
@@ -454,9 +454,19 @@ public final class Errors extends Indexe
         public static final short IllegalParameterValue_2 = 144;
 
         /**
+         * Property “{0}” can not be of type ‘{1}’.
+         */
+        public static final short IllegalPropertyType_2 = 223;
+
+        /**
          * Property “{0}” does not accept instances of ‘{1}’.
          */
-        public static final short IllegalPropertyClass_2 = 40;
+        public static final short IllegalPropertyValueClass_2 = 40;
+
+        /**
+         * Expected an instance of ‘{1}’ for the “{0}” property, but got an 
instance of ‘{2}’.
+         */
+        public static final short IllegalPropertyValueClass_3 = 224;
 
         /**
          * Range [{0} … {1}] is not valid.

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties?rev=1739129&r1=1739128&r2=1739129&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
 [ISO-8859-1] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors.properties
 [ISO-8859-1] Thu Apr 14 15:52:40 2016
@@ -100,7 +100,9 @@ IllegalOrdinateRange_3            = The
 IllegalParameterType_2            = Parameter \u201c{0}\u201d can not be of 
type \u2018{1}\u2019.
 IllegalParameterValue_2           = Parameter \u201c{0}\u201d can not take the 
\u201c{1}\u201d value.
 IllegalParameterValueClass_3      = Parameter \u201c{0}\u201d does not accept 
values of \u2018{2}\u2019 type. Expected an instance of \u2018{1}\u2019 or 
derived type.
-IllegalPropertyClass_2            = Property \u201c{0}\u201d does not accept 
instances of \u2018{1}\u2019.
+IllegalPropertyType_2             = Property \u201c{0}\u201d can not be of 
type \u2018{1}\u2019.
+IllegalPropertyValueClass_2       = Property \u201c{0}\u201d does not accept 
instances of \u2018{1}\u2019.
+IllegalPropertyValueClass_3       = Expected an instance of \u2018{1}\u2019 
for the \u201c{0}\u201d property, but got an instance of \u2018{2}\u2019.
 IllegalRange_2                    = Range [{0} \u2026 {1}] is not valid.
 IllegalUnicodeCodePoint_2         = Value {1} for \u201c{0}\u201d is not a 
valid Unicode code point.
 IllegalUnitFor_2                  = Unit of measurement \u201c{1}\u201d is not 
valid for \u201c{0}\u201d values.

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties?rev=1739129&r1=1739128&r2=1739129&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
 [ISO-8859-1] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/util/resources/Errors_fr.properties
 [ISO-8859-1] Thu Apr 14 15:52:40 2016
@@ -97,7 +97,9 @@ IllegalOrdinateRange_3            = La p
 IllegalParameterType_2            = Le param\u00e8tre 
\u00ab\u202f{0}\u202f\u00bb ne peut pas \u00eatre du type \u2018{1}\u2019.
 IllegalParameterValue_2           = Le param\u00e8tre 
\u00ab\u202f{0}\u202f\u00bb n\u2019accepte pas la valeur 
\u00ab\u202f{1}\u202f\u00bb.
 IllegalParameterValueClass_3      = Le param\u00e8tre 
\u00ab\u202f{0}\u202f\u00bb n\u2019accepte pas les valeurs de type 
\u2018{2}\u2019. Une instance de \u2018{1}\u2019 ou d\u2019un type 
d\u00e9riv\u00e9 \u00e9tait attendue.
-IllegalPropertyClass_2            = La propri\u00e9t\u00e9 
\u00ab\u202f{0}\u202f\u00bb n\u2019accepte pas les valeurs de type 
\u2018{1}\u2019.
+IllegalPropertyType_2             = La propri\u00e9t\u00e9 
\u00ab\u202f{0}\u202f\u00bb ne peut pas \u00eatre du type \u2018{1}\u2019.
+IllegalPropertyValueClass_2       = La propri\u00e9t\u00e9 
\u00ab\u202f{0}\u202f\u00bb n\u2019accepte pas les valeurs de type 
\u2018{1}\u2019.
+IllegalPropertyValueClass_3       = Une instance \u2018{1}\u2019 \u00e9tait 
attendue pour la propri\u00e9t\u00e9 \u00ab\u202f{0}\u202f\u00bb, mais la 
valeur donn\u00e9e est une instance de \u2018{2}\u2019.
 IllegalRange_2                    = La plage [{0} \u2026 {1}] n\u2019est pas 
valide.
 IllegalUnicodeCodePoint_2         = La valeur {1} de 
\u00ab\u202f{0}\u202f\u00bb n\u2019est pas un code Unicode valide.
 IllegalUnitFor_2                  = L\u2019unit\u00e9 de mesure 
\u00ab\u202f{1}\u202f\u00bb n\u2019est pas valide pour les valeurs de 
\u00ab\u202f{0}\u202f\u00bb.

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java?rev=1739129&r1=1739128&r2=1739129&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java 
[UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java 
[UTF-8] Thu Apr 14 15:52:40 2016
@@ -343,7 +343,7 @@ abstract class Pooled {
                             final Object schema = map.get(key);
                             if (schema != null) {
                                 if (!(schema instanceof String)) {
-                                    throw new 
PropertyException(Errors.format(Errors.Keys.IllegalPropertyClass_2,
+                                    throw new 
PropertyException(Errors.format(Errors.Keys.IllegalPropertyValueClass_2,
                                             name + "[\"" + key + "\"]", 
value.getClass()));
                                 }
                                 copy.put(key, (String) schema);
@@ -400,7 +400,7 @@ abstract class Pooled {
             }
         } catch (ClassCastException | IllformedLocaleException e) {
             throw new PropertyException(Errors.format(
-                    Errors.Keys.IllegalPropertyClass_2, name, 
value.getClass()), e);
+                    Errors.Keys.IllegalPropertyValueClass_2, name, 
value.getClass()), e);
         }
         /*
          * If we reach this point, the given name is not a SIS property. Try 
to handle

Modified: 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/PooledTemplate.java
URL: 
http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/PooledTemplate.java?rev=1739129&r1=1739128&r2=1739129&view=diff
==============================================================================
--- 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/PooledTemplate.java
 [UTF-8] (original)
+++ 
sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/PooledTemplate.java
 [UTF-8] Thu Apr 14 15:52:40 2016
@@ -96,7 +96,7 @@ final class PooledTemplate extends Poole
         if (value == null) {
             return defaultValue;
         }
-        throw new 
PropertyException(Errors.format(Errors.Keys.IllegalPropertyClass_2, name, 
value.getClass()));
+        throw new 
PropertyException(Errors.format(Errors.Keys.IllegalPropertyValueClass_2, name, 
value.getClass()));
     }
 
     /**


Reply via email to