File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
EssentialsDiscord/src/main/java/net/essentialsx/discord Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ public void onEnable() {
3636 getLogger ().log (Level .WARNING , tl ("versionMismatchAll" ));
3737 }
3838
39+ // JDK-8274349 - Mitigation for a regression in Java 17 on 1 core systems which was fixed in 17.0.2
40+ final String [] javaVersion = System .getProperty ("java.version" ).split ("\\ ." );
41+ if (Runtime .getRuntime ().availableProcessors () <= 1 && javaVersion [0 ].startsWith ("17" ) && (javaVersion .length < 2 || (javaVersion [1 ].equals ("0" ) && javaVersion [2 ].startsWith ("1" )))) {
42+ logger .log (Level .INFO , "Essentials is mitigating JDK-8274349" );
43+ System .setProperty ("java.util.concurrent.ForkJoinPool.common.parallelism" , "1" );
44+ }
45+
3946 isPAPI = getServer ().getPluginManager ().getPlugin ("PlaceholderAPI" ) != null ;
4047
4148 settings = new DiscordSettings (this );
You can’t perform that action at this time.
0 commit comments