-
Enhancement
-
Resolution: Not an Issue
-
P3
-
None
-
9
-
generic
-
generic
FULL PRODUCT VERSION :
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
A DESCRIPTION OF THE PROBLEM :
java.util.spi.ResourceBundleControlProvider made possible to plug some custom logic to load the resource bundles in Java 8.
In Java 9 and with named modules this is no more possible without changing all the code making impossible to migrate some code and to cover the same features (before you were able to switch the way bundles were loaded without modifying caller code).
This is a huge regression blocking Java 9 migrating and there is no real reason it is not possible. Can you please ensure it is still possible to override the way the bundles are loaded without any code change?
I didn't find any valid reason to have the isNamed test injava.util.ResourceBundle#getDefaultControl(java.lang.Module, java.lang.String) and it would be fixing the regressin to remove the test and always call ResourceBundleControlProviderHolder.getControl.
Thanks,
Romain
REGRESSION. Last worked in version 8u162
ADDITIONAL REGRESSION INFORMATION:
Implement a ResourceBundleControlProvider hardcoding a custom bundle in provider.jar, then create a module (module.jar) using java.util.ResourceBundle#getBundle(java.lang.String) for instance and name this module. Run module.jar code with whatever JVM setup and see that the custom bundle is never loaded.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
A DESCRIPTION OF THE PROBLEM :
java.util.spi.ResourceBundleControlProvider made possible to plug some custom logic to load the resource bundles in Java 8.
In Java 9 and with named modules this is no more possible without changing all the code making impossible to migrate some code and to cover the same features (before you were able to switch the way bundles were loaded without modifying caller code).
This is a huge regression blocking Java 9 migrating and there is no real reason it is not possible. Can you please ensure it is still possible to override the way the bundles are loaded without any code change?
I didn't find any valid reason to have the isNamed test injava.util.ResourceBundle#getDefaultControl(java.lang.Module, java.lang.String) and it would be fixing the regressin to remove the test and always call ResourceBundleControlProviderHolder.getControl.
Thanks,
Romain
REGRESSION. Last worked in version 8u162
ADDITIONAL REGRESSION INFORMATION:
Implement a ResourceBundleControlProvider hardcoding a custom bundle in provider.jar, then create a module (module.jar) using java.util.ResourceBundle#getBundle(java.lang.String) for instance and name this module. Run module.jar code with whatever JVM setup and see that the custom bundle is never loaded.
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-8303309 Reconsider re-opening JDK-8190696
-
- Open
-
-
JDK-8193680 Migration issues due to ResourceBundleControlProvider no more being usable in JDK 9
-
- Closed
-