Changeset 18322 in josm


Ignore:
Timestamp:
2021-11-11T13:45:51+01:00 (2 years ago)
Author:
Don-vip
Message:

see #20522 see #21005 - Allow security manager, otherwise it raises a warning in Java 17 and throws an error with Java 18+

See https://bugs.openjdk.java.net/browse/JDK-8271301
See https://bugs.openjdk.java.net/browse/JDK-8270380

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r18309 r18322  
    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"/>
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r18115 r18322  
    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
Note: See TracChangeset for help on using the changeset viewer.