sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1724584 - in /sis/branches/JDK7: ./ core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
Date Thu, 14 Jan 2016 11:19:39 GMT
Author: desruisseaux
Date: Thu Jan 14 11:19:39 2016
New Revision: 1724584

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

Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 14 11:19:39 2016
@@ -1,4 +1,4 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1584960-1724474
+/sis/branches/JDK8:1584960-1724583
 /sis/trunk:1394364-1508466,1519089-1519674

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1724584&r1=1724583&r2=1724584&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
[UTF-8] Thu Jan 14 11:19:39 2016
@@ -328,10 +328,10 @@ public class ImmutableIdentifier extends
          * risk of false code space.
          */
         value = properties.get(CODESPACE_KEY);
-        if (value == null && !properties.containsKey(CODESPACE_KEY)) {
+        if (value == null) {
             codeSpace = org.apache.sis.internal.util.Citations.getCodeSpace(authority);
-        } else if (value instanceof String) {
-            codeSpace = trimWhitespaces((String) value);
+        } else if (value instanceof CharSequence) {
+            codeSpace = trimWhitespaces((CharSequence) value).toString();
         } else {
             throw illegalPropertyType(properties, CODESPACE_KEY, value);
         }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java?rev=1724584&r1=1724583&r2=1724584&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
[UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
[UTF-8] Thu Jan 14 11:19:39 2016
@@ -2103,7 +2103,7 @@ addURIs:    for (int i=0; ; i++) {
      * Returns the name and description for the specified {@link CoordinateSystemAxis} code.
      * Many axes share the same name and description, so it is worth to cache them.
      */
-    private AxisName getAxisName(final Integer code) throws FactoryException {
+    private AxisName getAxisName(final Integer code) throws FactoryException, SQLException
{
         assert Thread.holdsLock(this);
         AxisName returnValue = axisNames.get(code);
         if (returnValue == null) {
@@ -2124,8 +2124,6 @@ addURIs:    for (int i=0; ; i++) {
                     final AxisName axis = new AxisName(name, description);
                     returnValue = ensureSingleton(axis, returnValue, code);
                 }
-            } catch (SQLException exception) {
-                throw databaseFailure(AxisName.class, code, exception);
             }
             if (returnValue == null) {
                 throw noSuchAuthorityCode(AxisName.class, String.valueOf(code));



Mime
View raw message