Skip to content

Commit

Permalink
[GR-36062] Resource Bundle issues
Browse files Browse the repository at this point in the history
PullRequest: graal/12657
  • Loading branch information
dnestoro committed May 6, 2023
2 parents 38c28d7 + 43e7196 commit 1cb72d2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ public List<ResourceBundle> getResourceBundle(String bundleSpec, Locale locale)
moduleName = null;
bundleName = specParts[0];
}
bundleName = bundleName.replace("/", ".");
String packageName = packageName(bundleName);
Set<Module> modules;
if (ResourcesFeature.MODULE_NAME_ALL_UNNAMED.equals(moduleName)) {
Expand Down Expand Up @@ -269,7 +270,7 @@ public List<ResourceBundle> getResourceBundle(String bundleSpec, Locale locale)
}

private static String packageName(String bundleName) {
int classSep = bundleName.replace('/', '.').lastIndexOf('.');
int classSep = bundleName.lastIndexOf('.');
if (classSep == -1) {
return ""; /* unnamed package */
}
Expand Down

0 comments on commit 1cb72d2

Please sign in to comment.