[java-identity-provider] branch master updated: JSPT-76 - centralise detection of Java runtime version
Ian Young
ian at iay.org.uk
Fri Nov 10 09:33:19 EST 2017
This is an automated email from the git hooks/post-receive script.
iay pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=0120236c926ca06c8d7c71e108999a6734071dac
The following commit(s) were added to refs/heads/master by this push:
new 0120236 JSPT-76 - centralise detection of Java runtime version
0120236 is described below
commit 0120236c926ca06c8d7c71e108999a6734071dac
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Fri Nov 10 14:33:15 2017 +0000
JSPT-76 - centralise detection of Java runtime version
---
.../idp/profile/context/navigate/ScriptedFunctionTest.java | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/idp-profile-api/src/test/java/net/shibboleth/idp/profile/context/navigate/ScriptedFunctionTest.java b/idp-profile-api/src/test/java/net/shibboleth/idp/profile/context/navigate/ScriptedFunctionTest.java
index 3080ec8..d0d2483 100644
--- a/idp-profile-api/src/test/java/net/shibboleth/idp/profile/context/navigate/ScriptedFunctionTest.java
+++ b/idp-profile-api/src/test/java/net/shibboleth/idp/profile/context/navigate/ScriptedFunctionTest.java
@@ -26,6 +26,8 @@ import org.opensaml.profile.context.ProfileRequestContext;
import org.testng.Assert;
import org.testng.annotations.Test;
+import net.shibboleth.utilities.java.support.testing.TestSupport;
+
/**
*
*/
@@ -36,20 +38,15 @@ public class ScriptedFunctionTest {
static final String INTEGER_RETURN_7 = "new java.lang.Integer(37);";
static final String INTEGER_RETURN_8 = "JavaInteger=Java.type(\"java.lang.Integer\"); new JavaInteger(37);";
- private boolean isV8() {
- final String ver = System.getProperty("java.version");
- return ver.startsWith("1.8");
- }
-
private String stringReturn() {
- if (isV8()) {
+ if (TestSupport.isJavaV8OrLater()) {
return STRING_RETURN_8;
}
return STRING_RETURN_7;
}
private String integerReturn() {
- if (isV8()) {
+ if (TestSupport.isJavaV8OrLater()) {
return INTEGER_RETURN_8;
}
return INTEGER_RETURN_7;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list