sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1727316 - in /sis/branches/JDK7: ./ core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/ core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/ core/sis-utility/src/main/java/org/apache/sis/internal/util/
Date Thu, 28 Jan 2016 11:57:35 GMT
Author: desruisseaux
Date: Thu Jan 28 11:57:34 2016
New Revision: 1727316

URL: http://svn.apache.org/viewvc?rev=1727316&view=rev
Log:
Merge bug fixes from the JDK8 branch.

Added:
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/RecordSchemaSIS.java
      - copied unchanged from r1727313, sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/RecordSchemaSIS.java
Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 28 11:57:34 2016
@@ -1,4 +1,4 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1584960-1727153
+/sis/branches/JDK8:1584960-1727313
 /sis/trunk:1394364-1508466,1519089-1519674

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java?rev=1727316&r1=1727315&r2=1727316&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/TransformationAccuracy.java
[UTF-8] Thu Jan 28 11:57:34 2016
@@ -22,11 +22,9 @@ import org.opengis.util.RecordType;
 import org.opengis.util.InternationalString;
 import org.opengis.metadata.quality.PositionalAccuracy;
 import org.opengis.metadata.quality.EvaluationMethodType;
-import org.apache.sis.internal.util.Constants;
 import org.apache.sis.metadata.iso.quality.DefaultQuantitativeResult;
 import org.apache.sis.metadata.iso.quality.DefaultAbsoluteExternalPositionalAccuracy;
 import org.apache.sis.util.collection.WeakValueHashMap;
-import org.apache.sis.util.iso.DefaultRecordSchema;
 import org.apache.sis.util.iso.DefaultRecord;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.util.Static;
@@ -50,12 +48,9 @@ public final class TransformationAccurac
     /**
      * The type of record instances which will hold coordinate transformation accuracy values.
      */
-    private static final RecordType TYPE;
-    static {
-        final DefaultRecordSchema schema = new DefaultRecordSchema(null, null, Constants.SIS);
-        TYPE = schema.createRecordType("Real", Collections.<CharSequence,Class<?>>singletonMap(
-                Vocabulary.formatInternational(Vocabulary.Keys.Value), Double.class));
-    }
+    private static final RecordType TYPE = RecordSchemaSIS.INSTANCE.createRecordType("Real",
+            Collections.<CharSequence,Class<?>>singletonMap(
+                    Vocabulary.formatInternational(Vocabulary.Keys.Value), Double.class));
 
     /**
      * Cache the positional accuracies. Most coordinate operation use a small set of accuracy
values.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java?rev=1727316&r1=1727315&r2=1727316&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/MultiAuthoritiesFactory.java
[UTF-8] Thu Jan 28 11:57:34 2016
@@ -736,6 +736,9 @@ public class MultiAuthoritiesFactory ext
         final String[] parameters;
         final DefinitionURI uri = DefinitionURI.parse(code);
         if (uri != null) {
+            if (uri.authority == null) {
+                throw new NoSuchAuthorityCodeException(Errors.format(Errors.Keys.MissingAuthority_1,
code), null, uri.code, code);
+            }
             final Class<? extends T> type = proxy.type;
             authority  = uri.authority;
             version    = uri.version;

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java?rev=1727316&r1=1727315&r2=1727316&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java
[UTF-8] Thu Jan 28 11:57:34 2016
@@ -96,7 +96,7 @@ public class LazySet<E> extends SetOfUnk
      * @param iterator The iterator to use for filling this set.
      */
     public LazySet(final Iterator<? extends E> iterator) {
-        Objects.requireNonNull(sourceIterator);
+        Objects.requireNonNull(iterator);
         sourceIterator = iterator;
         source = null;
         createCache();



Mime
View raw message