sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1635197 - /sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
Date Wed, 29 Oct 2014 16:43:51 GMT
Author: desruisseaux
Date: Wed Oct 29 16:43:51 2014
New Revision: 1635197

URL: http://svn.apache.org/r1635197
Log:
Minor simplification.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java?rev=1635197&r1=1635196&r2=1635197&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyAccessor.java
[UTF-8] Wed Oct 29 16:43:51 2014
@@ -648,17 +648,13 @@ class PropertyAccessor {
             final Class<?> elementType = elementTypes[index];
             final String   name        = name(index, KeyNamePolicy.UML_IDENTIFIER);
             final Method   getter      = getters[index];
-            ValueRange range = null;
-            if (implementation != type) {
-                final int e = Numbers.getEnumConstant(elementType);
-                if (e >= Numbers.BYTE && e <= Numbers.DOUBLE) try {
-                    range = implementation.getMethod(getter.getName(), (Class<?>[])
null)
-                            .getAnnotation(ValueRange.class);
-                } catch (NoSuchMethodException error) {
-                    // Should never happen, since the implementation class
-                    // implements the interface where the getter come from.
-                    throw new AssertionError(error);
-                }
+            final ValueRange range;
+            try {
+                range = implementation.getMethod(getter.getName(), (Class<?>[]) null).getAnnotation(ValueRange.class);
+            } catch (NoSuchMethodException error) {
+                // Should never happen, since the implementation class
+                // implements the interface where the getter come from.
+                throw new AssertionError(error);
             }
             information = new PropertyInformation<>(standard, name, getter, elementType,
range);
             informations[index] = information;



Mime
View raw message