Skip to content

Commit

Permalink
If bundle is not located in any module get it via classloader (from A…
Browse files Browse the repository at this point in the history
…LL_UNNAMED)
  • Loading branch information
olpaw committed Jun 25, 2021
1 parent 89bb920 commit 7302e45
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public List<ResourceBundle> getResourceBundle(String bundleSpec, Locale locale)
modules = packageToModules.getOrDefault(packageName, Collections.emptySet());
}
if (modules.isEmpty()) {
throw new MissingResourceException("ResourceBundle cannot be found.", bundleSpec, locale.toLanguageTag());
/* If bundle is not located in any module get it via classloader (from ALL_UNNAMED) */
return Collections.singletonList(ResourceBundle.getBundle(bundleName, locale, classLoaderSupport.getClassLoader()));
}
ArrayList<ResourceBundle> resourceBundles = new ArrayList<>();
for (Module module : modules) {
Expand Down

0 comments on commit 7302e45

Please sign in to comment.