[9] RFR: 8180375: Rename <baseName>Provider to <packagename>.spi.<simpleName>Provider

Mandy Chung mandy.chung at oracle.com
Tue May 16 21:52:15 UTC 2017


> On May 16, 2017, at 11:14 AM, Naoto Sato <naoto.sato at oracle.com> wrote:
> 
> Hello,
> 
> Please review the changes to the following issue:
> 
> https://bugs.openjdk.java.net/browse/JDK-8180375
> 
> The proposed fix is located at:
> 
> http://cr.openjdk.java.net/~naoto/8180375/webrev.00/
> 
> This is to change the package name of the resource bundle provider to a different one, by appending ".spi" to the original package name. This change effectively avoids possible split package issue if resource bundles are provided from other named modules.

This would ease migration in particular when the provider modules are loaded in a layer defined to multiple loader.  Existing resource bundles can be kept in the same package.

 247  * The service type is designated by {@code package name + ".spi." + simple name +"Provider"}. For

It may be clearer to say {@code <package name> + “.spi.” + <simple name> + “Provider”}.


test/java/util/ResourceBundle/modules/appbasic/src/test/jdk/test/resources/spi/MyResourcesProviderImpl.java
test/java/util/ResourceBundle/modules/appbasic2/src/test/jdk/test/resources/spi/MyResourcesProviderImpl.java
   - they are provider implmentation classes.  They don’t need to be renamed. If you want to rename them, maybe better to move them to jdk.test.resources.internal package.

test/java/util/ResourceBundle/modules/layer/src/Main.java
test/java/util/ResourceBundle/modules/layer/src/m1/p/Main.java
   Nit: several long lines that can be wrapped.

Otherwise looks fine.

Mandy


More information about the core-libs-dev mailing list