File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
src/org/openstreetmap/josm/gui Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,7 @@ Build-Date: ${build.tstamp}
457457 <jvmarg value =" ${ jacocoagent@{testfamily } @{ testITsuffix } }" if : set =" jacocoagent@{ testfamily } @{ testITsuffix } " />
458458 <jvmarg value =" -Dfile.encoding=UTF-8" />
459459 <jvmarg value =" -Djava.locale.providers=SPI,JRE,CLDR" if : set =" isJava9" />
460+ <jvmarg value =" -Djava.security.manager=allow" if : set =" isJava17" />
460461 <jvmarg value =" -javaagent:${ test.dir } /lib/jmockit.jar" />
461462 <jvmarg value =" -Djunit.jupiter.extensions.autodetection.enabled=true" />
462463 <jvmarg value =" -Djunit.jupiter.execution.parallel.enabled=true" />
Original file line number Diff line number Diff line change @@ -1034,6 +1034,11 @@ private static void updateSystemProperties() {
10341034 }
10351035 // Disable automatic POST retry after 5 minutes, see #17882 / https://bugs.openjdk.java.net/browse/JDK-6382788
10361036 Utils .updateSystemProperty ("sun.net.http.retryPost" , "false" );
1037+ if (Utils .getJavaVersion () >= 17 ) {
1038+ // Allow security manager, otherwise it raises a warning in Java 17 and throws an error with Java 18+
1039+ // See https://bugs.openjdk.java.net/browse/JDK-8271301 / https://bugs.openjdk.java.net/browse/JDK-8270380
1040+ Utils .updateSystemProperty ("java.security.manager" , "allow" );
1041+ }
10371042 }
10381043
10391044 /**
You can’t perform that action at this time.
0 commit comments