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

commit 8d615248387cd9e411fc7d2b8012f8e114879c44
Author: Jaikiran Pai <[email protected]>
AuthorDate: Thu Aug 10 15:45:06 2023 +0530

    Revert "allow security manager setting on all versions above Java 18 
(inclusive)"
    
    This reverts commit bbe6859b2f57a2c9dcb51e269527f3c18a74aa1d.
---
 src/script/ant | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/src/script/ant b/src/script/ant
index ebc5e95ef..81107b58f 100644
--- a/src/script/ant
+++ b/src/script/ant
@@ -368,19 +368,6 @@ else
     ant_sys_opts="-Djikes.class.path=\"$JIKESPATH\""
   fi
 fi
-# Run "java -XshowSettings:properties" and check the output for 
"java.specification.version" value
-JAVA_SPEC_VERSION=$("$JAVACMD" -XshowSettings:properties 2>&1 | sed -n -e 
's/[[:space:]]//g' -e 's/^java\.specification\.version=//p')
-case "$JAVA_SPEC_VERSION" in
-  1.*)
-    # Up to and including Java 8, versions are reported as 1.N.
-    ;;
-  *)
-    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
-    ;;
-esac
 ant_exec_command="exec \"\$JAVACMD\" $ANT_OPTS -classpath \"\$LOCALCLASSPATH\" 
-Dant.home=\"\$ANT_HOME\" -Dant.library.dir=\"\$ANT_LIB\" $ant_sys_opts 
org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"\$CLASSPATH\""
 if $ant_exec_debug; then
   # using printf to avoid echo line continuation and escape interpretation 
confusion

Reply via email to