You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ja...@apache.org on 2022/11/16 14:03:33 UTC
[ant] branch master updated: allow security manager setting on all versions above Java 18 (inclusive)
This is an automated email from the ASF dual-hosted git repository.
jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new bbe6859b2 allow security manager setting on all versions above Java 18 (inclusive)
bbe6859b2 is described below
commit bbe6859b2f57a2c9dcb51e269527f3c18a74aa1d
Author: Jaikiran Pai <ja...@apache.org>
AuthorDate: Tue Nov 8 09:13:04 2022 +0530
allow security manager setting on all versions above Java 18 (inclusive)
---
src/script/ant | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/script/ant b/src/script/ant
index b3b4c0ae1..cfeb2759f 100644
--- a/src/script/ant
+++ b/src/script/ant
@@ -369,8 +369,8 @@ else
fi
fi
# Run "java -XshowSettings:properties" and check the output for "java.specification.version" value
-JAVA_SPEC_VERSION=`"$JAVACMD" -XshowSettings:properties 2>&1 | grep "java.specification.version = " | tr -d '[:space:]'`
-if [ "$JAVA_SPEC_VERSION" = "java.specification.version=18" ] || [ "$JAVA_SPEC_VERSION" = "java.specification.version=19" ]; then
+JAVA_SPEC_VERSION=$("$JAVACMD" -XshowSettings:properties 2>&1 | grep "java.specification.version = " | tr -d '[:space:]java.specification.version=')
+if [ "$JAVA_SPEC_VERSION" -ge 18 ]; then
# set security manager property to allow calls to System.setSecurityManager() at runtime
ANT_OPTS="$ANT_OPTS -Djava.security.manager=allow"
fi