mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-21 20:56:45 +01:00
Fix Folia locale string concurrency issue Fixes #5097
This commit is contained in:
parent
f90a15a821
commit
2ea9cff2cd
@ -1,4 +1,5 @@
|
|||||||
Version 2.2.027
|
Version 2.2.027
|
||||||
|
Fixed concurrency issue with Folia regarding locale strings
|
||||||
|
|
||||||
Version 2.2.026
|
Version 2.2.026
|
||||||
Fixed NullPointerException on ChunkUnloadEvent
|
Fixed NullPointerException on ChunkUnloadEvent
|
||||||
|
@ -15,6 +15,7 @@ import java.text.MessageFormat;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@ -22,7 +23,8 @@ import java.util.regex.Pattern;
|
|||||||
public final class LocaleLoader {
|
public final class LocaleLoader {
|
||||||
private static final String BUNDLE_ROOT = "com.gmail.nossr50.locale.locale";
|
private static final String BUNDLE_ROOT = "com.gmail.nossr50.locale.locale";
|
||||||
private static final String OVERRIDE_FILE_NAME = "locale_override.properties";
|
private static final String OVERRIDE_FILE_NAME = "locale_override.properties";
|
||||||
private static Map<String, String> bundleCache = new HashMap<>();
|
// Must be concurrent to accomodate Folia
|
||||||
|
private static Map<String, String> bundleCache = new ConcurrentHashMap<>();
|
||||||
private static ResourceBundle bundle = null;
|
private static ResourceBundle bundle = null;
|
||||||
private static ResourceBundle filesystemBundle = null;
|
private static ResourceBundle filesystemBundle = null;
|
||||||
private static ResourceBundle enBundle = null;
|
private static ResourceBundle enBundle = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user