Skip to content

Commit

Permalink
[JENKINS-67000] Restore setting of null security manager
Browse files Browse the repository at this point in the history
  • Loading branch information
jglick committed Feb 4, 2022
1 parent 2fb707a commit 55922bb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/hudson/remoting/jnlp/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,13 @@ public static void main(String[] args) throws IOException, InterruptedException
* Main without the argument handling.
*/
public static void _main(String[] args) throws IOException, InterruptedException, CmdLineException {
// TODO skip this on Java 17+ (e.g. io.jenkins.lib.versionnumber.JavaSpecificationVersion) as it prints a warning; otherwise needed for JavaWebStart agents
try {
System.setSecurityManager(null);
} catch (SecurityException e) {
// ignore
}

// if we run in Mac, put the menu bar where the user expects it
System.setProperty("apple.laf.useScreenMenuBar", "true");

Expand Down

0 comments on commit 55922bb

Please sign in to comment.