Skip to content

Commit

Permalink
[PATCH] Remove --add-opens directives on Java 17 (jenkinsci#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored and lemeurherve committed Mar 11, 2022
1 parent 3c6822f commit 421cf58
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions jenkins-agent
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 421cf58

Please sign in to comment.