Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -80,9 +79,6 @@ public List<ResourceBundle> getResourceBundle(String bundleSpec, Locale locale)
bundleName = specParts[0];
}
String packageName = packageName(bundleName);
if (packageName == null) {
throw new MissingResourceException("ResourceBundle does not seem to be a fully qualified class name.", bundleName, locale.toLanguageTag());
}
Set<Module> modules;
if (moduleName != null) {
modules = classLoaderSupport.findModule(moduleName).stream().collect(Collectors.toSet());
Expand All @@ -107,8 +103,7 @@ public List<ResourceBundle> getResourceBundle(String bundleSpec, Locale locale)
private static String packageName(String bundleName) {
int classSep = bundleName.replace('/', '.').lastIndexOf('.');
if (classSep == -1) {
/* The bundle is not specified via a java.class or java.properties format. */
return null;
return ""; /* unnamed package */
}
return bundleName.substring(0, classSep);
}
Expand Down