Skip to content

Commit

Permalink
ignore UnsupportedOperationException thrown by jdk>18 when trying to …
Browse files Browse the repository at this point in the history
…setup the SystemExitSecurityManager (#1513)
  • Loading branch information
vboulaye committed Jun 16, 2024
1 parent f3a5c50 commit 7a237c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fitnesse/slim/instructions/SystemExitSecurityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ private static void tryUpdateSecurityManager(SecurityManager securityManager) {
System.setSecurityManager(securityManager);
} catch (SecurityException e) {
System.err.println("Security manager could not be updated");
} catch (UnsupportedOperationException e) {
System.err.println("Security manager could not be updated. If you are using a JDK version >=18, you need to set " +
"-Djava.security.manager=allow to allow this. Or use -Dprevent.system.exit=false to disable the FitNesse feature" +
" blocking System.exit() calls and prevent this message.");
}
}

Expand Down

0 comments on commit 7a237c2

Please sign in to comment.