sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1822013 - in /sis/branches/ISO-19115-3/core/sis-utility/src: main/java/org/apache/sis/internal/jaxb/Context.java main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java test/java/org/apache/sis/test/XMLTestCase.java
Date Tue, 23 Jan 2018 15:16:59 GMT
Author: desruisseaux
Date: Tue Jan 23 15:16:58 2018
New Revision: 1822013

URL: http://svn.apache.org/viewvc?rev=1822013&view=rev
Log:
Use pre-defined Version constants.

Modified:
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
    sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
    sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java?rev=1822013&r1=1822012&r2=1822013&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/Context.java
[UTF-8] Tue Jan 23 15:16:58 2018
@@ -296,7 +296,7 @@ public final class Context extends Marsh
             case "gml": return versionGML;
             case "gmd": {
                 if ((bitMasks & MARSHALLING) == 0) break;   // If unmarshalling, we don't
know the version.
-                return new Version((bitMasks & LEGACY_METADATA) != 0 ? "2007" : "2016");
+                return (bitMasks & LEGACY_METADATA) == 0 ? LegacyNamespaces.VERSION_2016
: LegacyNamespaces.VERSION_2007;
             }
             // Future SIS versions may add more cases here.
         }

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java?rev=1822013&r1=1822012&r2=1822013&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/LegacyNamespaces.java
[UTF-8] Tue Jan 23 15:16:58 2018
@@ -35,7 +35,9 @@ public final class LegacyNamespaces {
     /**
      * Miscellaneous version constants used for ISO standards.
      */
-    public static final Version VERSION_2014 = new Version("2014");
+    public static final Version VERSION_2007 = new Version("2007"),
+                                VERSION_2014 = new Version("2014"),
+                                VERSION_2016 = new Version("2016");
 
     /**
      * Miscellaneous version constants used for GML versions.

Modified: sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java
URL: http://svn.apache.org/viewvc/sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java?rev=1822013&r1=1822012&r2=1822013&view=diff
==============================================================================
--- sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java
[UTF-8] (original)
+++ sis/branches/ISO-19115-3/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java
[UTF-8] Tue Jan 23 15:16:58 2018
@@ -68,7 +68,7 @@ public abstract strictfp class XMLTestCa
     /**
      * Miscellaneous version constants used for ISO standards.
      */
-    protected static final Version VERSION_2007 = new Version("2007"),
+    protected static final Version VERSION_2007 = LegacyNamespaces.VERSION_2007,
                                    VERSION_2014 = LegacyNamespaces.VERSION_2014;
 
     /**



Mime
View raw message