--- old/src/java.base/share/classes/java/util/ResourceBundle.java 2017-05-17 14:54:57.387057263 -0700 +++ new/src/java.base/share/classes/java/util/ResourceBundle.java 2017-05-17 14:54:57.078051955 -0700 @@ -216,7 +216,7 @@ * the caller module, those resource bundles need to be loaded from service * providers of {@link ResourceBundleProvider}. The caller module must declare * "{@code uses}" and the service interface name is the concatenation of the - * package name of the base name, string "(@code .spi.}, the simple class + * package name of the base name, string "{@code .spi.}", the simple class * name of the base name, and the string "{@code Provider}". The * bundle provider modules containing resource bundles must * declare "{@code provides}" with the service interface name and @@ -244,7 +244,8 @@ * * The {@code getBundle} factory methods load service providers of * {@link ResourceBundleProvider}, if available, using {@link ServiceLoader}. - * The service type is designated by {@code package name + ".spi." + simple name +"Provider"}. For + * The service type is designated by + * {@code + ".spi." + + "Provider"}. For * example, if the base name is "{@code com.example.app.MyResources}", the service * type is {@code com.example.app.spi.MyResourcesProvider}. *

@@ -924,7 +925,12 @@ *

Resource bundles in named modules may be encapsulated. When * the resource bundle is loaded from a provider, the caller module * must have an appropriate uses clause in its module descriptor - * to declare that the module uses implementations of {@code "baseName"Provider}. + * to declare that the module uses implementations of + * {@code + ".spi." + + "Provider"}. + * Otherwise, it will load the resource bundles that are local in the + * given module or that are visible to the class loader of the given module + * (refer to the Resource Bundles in Named Modules + * section for details). * When the resource bundle is loaded from the specified module, it is * subject to the encapsulation rules specified by * {@link Module#getResourceAsStream Module.getResourceAsStream}. @@ -959,20 +965,17 @@ *

Resource bundles in named modules may be encapsulated. When * the resource bundle is loaded from a provider, the caller module * must have an appropriate uses clause in its module descriptor - * to declare that the module uses implementations of {@code "baseName"Provider}. + * to declare that the module uses implementations of + * {@code + ".spi." + + "Provider"}. + * Otherwise, it will load the resource bundles that are local in the + * given module or that are visible to the class loader of the given module + * (refer to the Resource Bundles in Named Modules + * section for details). * When the resource bundle is loaded from the specified module, it is * subject to the encapsulation rules specified by * {@link Module#getResourceAsStream Module.getResourceAsStream}. * *

- * If the given {@code module} is a named module, this method will - * load the service providers for {@link java.util.spi.ResourceBundleProvider} - * and also resource bundles that are local in the given module or that - * are visible to the class loader of the given module (refer to the - * Resource Bundles in Named Modules section - * for details). - * - *

* If the given {@code module} is an unnamed module, then this method is * equivalent to calling {@link #getBundle(String, Locale, ClassLoader) * getBundle(baseName, targetLocale, module.getClassLoader()} to load @@ -1071,8 +1074,10 @@ * Resource bundles in a named module are private to that module. If * the caller is in a named module, this method will find resource bundles * from the service providers of {@link java.util.spi.ResourceBundleProvider} - * and also find resource bundles that are in the caller's module or - * that are visible to the given class loader. + * if any. Otherwise, it will load the resource bundles that are visible to + * the given {@code loader} (refer to the + * Resource Bundles in Named Modules section + * for details). * If the caller is in a named module and the given {@code loader} is * different than the caller's class loader, or if the caller is not in * a named module, this method will not find resource bundles from named