[java-opensaml] branch master updated: JSPT-76 - centralise detection of Java runtime version
Ian Young
ian at iay.org.uk
Fri Nov 10 09:35:26 EST 2017
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch master
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=c9423148d6505a50bc51c7f42c63fd0860a2ac44
The following commit(s) were added to refs/heads/master by this push:
new c942314 JSPT-76 - centralise detection of Java runtime version
c942314 is described below
commit c9423148d6505a50bc51c7f42c63fd0860a2ac44
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Fri Nov 10 14:35:21 2017 +0000
JSPT-76 - centralise detection of Java runtime version
---
.../metadata/resolver/filter/impl/ScriptedFunctionTest.java | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/filter/impl/ScriptedFunctionTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/filter/impl/ScriptedFunctionTest.java
index a0dacc4..cfa201f 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/filter/impl/ScriptedFunctionTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/filter/impl/ScriptedFunctionTest.java
@@ -25,6 +25,7 @@ import javax.script.ScriptException;
import net.shibboleth.ext.spring.resource.ResourceHelper;
import net.shibboleth.utilities.java.support.resource.Resource;
+import net.shibboleth.utilities.java.support.testing.TestSupport;
import org.opensaml.core.xml.XMLObject;
import org.opensaml.core.xml.XMLObjectBaseTestCase;
@@ -45,20 +46,15 @@ public class ScriptedFunctionTest extends XMLObjectBaseTestCase {
static final String FILE_7 = "/org/opensaml/saml/metadata/resolver/filter/impl/script.js";
static final String FILE_8 = "/org/opensaml/saml/metadata/resolver/filter/impl/script8.js";
- private boolean isV8() {
- final String ver = System.getProperty("java.version");
- return ver.startsWith("1.8");
- }
-
private String script() {
- if (isV8()) {
+ if (TestSupport.isJavaV8OrLater()) {
return SCRIPT_8;
}
return SCRIPT_7;
}
private String file() {
- if (isV8()) {
+ if (TestSupport.isJavaV8OrLater()) {
return FILE_8;
}
return FILE_7;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list