-
Bug
-
Resolution: Not an Issue
-
P2
-
6
-
generic
-
generic
We are trying to test CCC 4052440 (pluggable locale) functionality using Service.reload() method.
The spec for this method says:
"This method is intended for use in situations in which new providers can be installed into a running Java virtual machine."
However following code doesn't install custom service provider from jar file (see the attachment)
URLClassLoader cl =
URLClassLoader.newInstance(
new URL[]{ new URL("file:///C:\\Tmp\\dltest\\testserviceprovider.jar") });
Service<LocaleNameProvider> s = Service.lookup(LocaleNameProvider.class, cl);
s.reload();
You may reproduce it running the Dltest.java class and (perhaps) changing a path to TestServiceProvider.jar file (attached as well). For example, after service provider dynamically loaded list of available locales isn't updated.
Locale.getAvailableLocales doesn't get extra locale from service provider in jar file.
===
Output of my test is:
javasoft.sqe.tests.api.java.util.spi.sp.util.LocaleNameProviderImpl@1c39a2d
Very bad! You didn't update available locales array!
===
The spec for this method says:
"This method is intended for use in situations in which new providers can be installed into a running Java virtual machine."
However following code doesn't install custom service provider from jar file (see the attachment)
URLClassLoader cl =
URLClassLoader.newInstance(
new URL[]{ new URL("file:///C:\\Tmp\\dltest\\testserviceprovider.jar") });
Service<LocaleNameProvider> s = Service.lookup(LocaleNameProvider.class, cl);
s.reload();
You may reproduce it running the Dltest.java class and (perhaps) changing a path to TestServiceProvider.jar file (attached as well). For example, after service provider dynamically loaded list of available locales isn't updated.
Locale.getAvailableLocales doesn't get extra locale from service provider in jar file.
===
Output of my test is:
javasoft.sqe.tests.api.java.util.spi.sp.util.LocaleNameProviderImpl@1c39a2d
Very bad! You didn't update available locales array!
===