forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -30,13 +30,13 @@ public class SteamwarResourceBundle extends PropertyResourceBundle {
|
||||
private static final Map<String, ResourceBundle> bundles = new HashMap<>();
|
||||
|
||||
public static ResourceBundle getResourceBundle(Locale locale) {
|
||||
return getResourceBundle(locale.toString(), getResourceBundle(locale.getLanguage(), getResourceBundle( "", null)));
|
||||
return getResourceBundle(locale.toString(), getResourceBundle(locale.getLanguage(), getResourceBundle("", null)));
|
||||
}
|
||||
|
||||
private static synchronized ResourceBundle getResourceBundle(String locale, ResourceBundle parent) {
|
||||
return bundles.computeIfAbsent(locale, locale1 -> {
|
||||
InputStream inputStream = Message.class.getResourceAsStream(BASE_PATH + ("".equals(locale) ? "" : "_" + locale) + ".properties");
|
||||
if(inputStream == null)
|
||||
if (inputStream == null)
|
||||
return parent;
|
||||
try {
|
||||
return new SteamwarResourceBundle(inputStream, parent);
|
||||
|
||||
Reference in New Issue
Block a user