From 921b076c14430787ef0f57ecf9b608222426ca1c Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Fri, 11 Mar 2022 12:17:28 -0800 Subject: [PATCH] Remove `--add-opens` directives on Java 17 (#263) --- jenkins-agent | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/jenkins-agent b/jenkins-agent index 3822dc5fc..6d1beb26e 100755 --- a/jenkins-agent +++ b/jenkins-agent @@ -128,18 +128,6 @@ else #TODO: Handle the case when the command-line and Environment variable contain different values. #It is fine it blows up for now since it should lead to an error anyway. - FUTURE_OPTS="" - if [ "$JENKINS_ENABLE_FUTURE_JAVA" ] ; then - FUTURE_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED - --add-opens java.base/java.io=ALL-UNNAMED - --add-opens java.base/java.util=ALL-UNNAMED - --add-opens java.base/java.util.concurrent=ALL-UNNAMED - --add-opens java.base/java.lang.reflect=ALL-UNNAMED - --add-opens java.base/java.text=ALL-UNNAMED - --add-opens java.desktop/java.awt.font=ALL-UNNAMED - " - fi - - exec $JAVA_BIN ${FUTURE_OPTS} $JAVA_OPTIONS -cp /usr/share/jenkins/agent.jar hudson.remoting.jnlp.Main -headless $TUNNEL $URL $WORKDIR $WEB_SOCKET $DIRECT $PROTOCOLS $INSTANCE_IDENTITY $OPT_JENKINS_SECRET $OPT_JENKINS_AGENT_NAME "$@" + exec $JAVA_BIN $JAVA_OPTIONS -cp /usr/share/jenkins/agent.jar hudson.remoting.jnlp.Main -headless $TUNNEL $URL $WORKDIR $WEB_SOCKET $DIRECT $PROTOCOLS $INSTANCE_IDENTITY $OPT_JENKINS_SECRET $OPT_JENKINS_AGENT_NAME "$@" fi