sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1659531 - in /sis/branches/JDK8/core/sis-utility/src: main/java/org/apache/sis/xml/Pooled.java test/java/org/apache/sis/util/VersionTest.java
Date Fri, 13 Feb 2015 12:19:41 GMT
Author: desruisseaux
Date: Fri Feb 13 12:19:40 2015
New Revision: 1659531

URL: http://svn.apache.org/r1659531
Log:
Suppression of "3.2" in "http://www.opengis.net/gml/3.2" does not work (SIS-192).

Modified:
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
    sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/VersionTest.java

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java?rev=1659531&r1=1659530&r2=1659531&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java [UTF-8]
(original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java [UTF-8]
Fri Feb 13 12:19:40 2015
@@ -260,7 +260,7 @@ abstract class Pooled {
             case 0: {
                 // Apply namespace replacements only for older versions than the one supported
natively by SIS.
                 if (versionGML != null) {
-                    if (versionGML.compareTo(LegacyNamespaces.VERSION_3_2_1, 2) < 0) {
+                    if (versionGML.compareTo(LegacyNamespaces.VERSION_3_2_1) < 0) {
                         return FilterVersion.GML31;
                     }
                 }

Modified: sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/VersionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/VersionTest.java?rev=1659531&r1=1659530&r2=1659531&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/VersionTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/test/java/org/apache/sis/util/VersionTest.java
[UTF-8] Fri Feb 13 12:19:40 2015
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.util;
 
+import org.apache.sis.internal.jaxb.LegacyNamespaces;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.TestCase;
 import org.junit.Test;
@@ -28,7 +29,7 @@ import static org.apache.sis.test.Assert
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.3
- * @version 0.4
+ * @version 0.6
  * @module
  */
 public final strictfp class VersionTest extends TestCase {
@@ -71,6 +72,21 @@ public final strictfp class VersionTest
     }
 
     /**
+     * Tests {@link Version#compareTo(Version, int)} with version numbers needed by our GML
support.
+     */
+    @Test
+    public void testGML() {
+        assertTrue(LegacyNamespaces.VERSION_3_2.compareTo(LegacyNamespaces.VERSION_3_2_1,
2) == 0);
+        assertTrue(LegacyNamespaces.VERSION_3_2.compareTo(LegacyNamespaces.VERSION_3_2_1
  )  < 0);
+        assertTrue(LegacyNamespaces.VERSION_3_0.compareTo(LegacyNamespaces.VERSION_3_2_1
  )  < 0);
+        assertTrue(LegacyNamespaces.VERSION_3_0.compareTo(LegacyNamespaces.VERSION_3_2_1,
2)  < 0);
+        assertTrue(LegacyNamespaces.VERSION_3_0.compareTo(LegacyNamespaces.VERSION_3_2_1,
1) == 0);
+        assertTrue(LegacyNamespaces.VERSION_3_0.compareTo(LegacyNamespaces.VERSION_3_2  
  )  < 0);
+        assertTrue(LegacyNamespaces.VERSION_3_0.compareTo(LegacyNamespaces.VERSION_3_2, 
 2)  < 0);
+        assertTrue(LegacyNamespaces.VERSION_3_0.compareTo(LegacyNamespaces.VERSION_3_2, 
 1) == 0);
+    }
+
+    /**
      * Tests the {@link Version#valueOf(int[])} method.
      */
     @Test



Mime
View raw message