[java-support] branch maint-7 updated: JSPT-76 - centralise detection of Java runtime version

Ian Young ian at iay.org.uk
Fri Nov 10 09:44:35 EST 2017


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch maint-7
in repository java-support.

View the commit online:
http://git.shibboleth.net/view/?p=java-support.git;a=commit;h=f902b193b40e941d3eee2b92ff244803f0aebacf

The following commit(s) were added to refs/heads/maint-7 by this push:
       new  f902b19   JSPT-76 - centralise detection of Java runtime version
f902b19 is described below

commit f902b193b40e941d3eee2b92ff244803f0aebacf
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Fri Nov 10 14:44:31 2017 +0000

    JSPT-76 - centralise detection of Java runtime version
---
 .../utilities/java/support/xml/SerializeSupportTest.java         | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/test/java/net/shibboleth/utilities/java/support/xml/SerializeSupportTest.java b/src/test/java/net/shibboleth/utilities/java/support/xml/SerializeSupportTest.java
index 73f2a62..39f4a3c 100644
--- a/src/test/java/net/shibboleth/utilities/java/support/xml/SerializeSupportTest.java
+++ b/src/test/java/net/shibboleth/utilities/java/support/xml/SerializeSupportTest.java
@@ -42,6 +42,7 @@ import org.w3c.dom.ls.LSSerializer;
 import org.xml.sax.SAXException;
 
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import net.shibboleth.utilities.java.support.testing.TestSupport;
 
 /**
  * Tests for {@link NamespaceSupport}
@@ -192,9 +193,13 @@ public class SerializeSupportTest {
         final Document dom = parserPool.parse(new StringReader(s));
 
         // JSPT-75:  Versions < 9 (i.e. until 1.8) would pass this bogus test.
-        Assert.assertTrue(!System.getProperty("java.version").startsWith("1.") ||
-                SerializeSupport.nodeToString(dom.getFirstChild()).equals(SerializeSupport.nodeToString(parent)),
+        // TODO: working test for Java 9, or rework
+        if (TestSupport.isJavaV9OrLater()) {
+            // skip the test
+        } else {
+            Assert.assertTrue(SerializeSupport.nodeToString(dom.getFirstChild()).equals(SerializeSupport.nodeToString(parent)),
                 "Should serialize to same output");
+        }
 
         assertEquals(dom.getFirstChild(), parent);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list