Index: /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 18348)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 18349)
@@ -3,4 +3,5 @@
 
 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
 import java.awt.GraphicsEnvironment;
@@ -15,4 +16,5 @@
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Utils;
 
 import com.ginsberg.junit.exit.ExpectSystemExitWithStatus;
@@ -42,4 +44,5 @@
     void testActionPerformed() {
         TestUtils.assumeWorkingJMockit();
+        assumeTrue(Utils.getJavaVersion() < 18 || "allow".equals(System.getProperty("java.security.manager")));
 
         boolean[] workerShutdownCalled = {false};
