Skip to content

Commit

Permalink
Simplify Messages and bundle loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaisiKoleni committed Feb 6, 2021
1 parent 0d3a106 commit 9c13028
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/main/java/de/tum/in/test/api/localization/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.Set;

import org.apiguardian.api.API;
import org.apiguardian.api.API.Status;
Expand All @@ -18,19 +17,8 @@ public final class Messages {

private static final String BUNDLE_NAME = "de.tum.in.test.api.localization.messages"; //$NON-NLS-1$

/**
* Must match the localizations in the resources.
*/
private static final Set<Locale> SUPPORTED_LOCALES = Set.of(Locale.ROOT, Locale.GERMAN);

private static Map<Locale, ResourceBundle> resourceBundleCache = Collections.synchronizedMap(new LruCache<>(100));

static {
for (Locale locale : SUPPORTED_LOCALES) {
resourceBundleCache.put(locale, loadBundleForLocale(locale));
}
}

private Messages() {

}
Expand Down

0 comments on commit 9c13028

Please sign in to comment.