sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1832097 - in /sis/branches/JDK8: application/sis-console/pom.xml core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataFallback.java core/sis-referencing-by-identifiers/pom.xml
Date Wed, 23 May 2018 12:33:31 GMT
Author: desruisseaux
Date: Wed May 23 12:33:31 2018
New Revision: 1832097

URL: http://svn.apache.org/viewvc?rev=1832097&view=rev
Log:
Add Derby dependency with <scope>test</scope> in modules that connect to spatial
database for their tests.

Modified:
    sis/branches/JDK8/application/sis-console/pom.xml
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataFallback.java
    sis/branches/JDK8/core/sis-referencing-by-identifiers/pom.xml

Modified: sis/branches/JDK8/application/sis-console/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/application/sis-console/pom.xml?rev=1832097&r1=1832096&r2=1832097&view=diff
==============================================================================
--- sis/branches/JDK8/application/sis-console/pom.xml (original)
+++ sis/branches/JDK8/application/sis-console/pom.xml Wed May 23 12:33:31 2018
@@ -161,6 +161,11 @@
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 </project>

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataFallback.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataFallback.java?rev=1832097&r1=1832096&r2=1832097&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataFallback.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/MetadataFallback.java
[UTF-8] Wed May 23 12:33:31 2018
@@ -17,6 +17,8 @@
 package org.apache.sis.metadata.sql;
 
 import org.opengis.util.ControlledVocabulary;
+import org.opengis.metadata.citation.Citation;
+import org.apache.sis.internal.metadata.ServicesForUtility;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.logging.WarningListener;
 import org.apache.sis.xml.NilReason;
@@ -72,8 +74,14 @@ final class MetadataFallback extends Met
         if (ControlledVocabulary.class.isAssignableFrom(type)) {
             value = getCodeList(type, identifier);
         } else {
-            // TODO: move some code from ServicesForUtility here.
-            return NilReason.MISSING.createNilObject(type);
+            value = null;
+            if (type == Citation.class) {
+                // TODO: move ServicesForUtility code here.
+                value = ServicesForUtility.createCitation(identifier);
+            }
+            if (value == null) {
+                return NilReason.MISSING.createNilObject(type);
+            }
         }
         return type.cast(value);
     }

Modified: sis/branches/JDK8/core/sis-referencing-by-identifiers/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing-by-identifiers/pom.xml?rev=1832097&r1=1832096&r2=1832097&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing-by-identifiers/pom.xml (original)
+++ sis/branches/JDK8/core/sis-referencing-by-identifiers/pom.xml Wed May 23 12:33:31 2018
@@ -135,11 +135,11 @@
       <type>test-jar</type>
       <scope>test</scope>
     </dependency>
-    <!-- dependency>
+    <dependency>
       <groupId>org.apache.derby</groupId>
       <artifactId>derby</artifactId>
       <scope>test</scope>
-    </dependency -->
+    </dependency>
   </dependencies>
 
 </project>



Mime
View raw message