8186738: (sl) ServiceLoader::stream doesn't update cache

Alan Bateman Alan.Bateman at oracle.com
Fri Oct 13 13:51:02 UTC 2017


On 12/10/2017 23:54, mandy chung wrote:
> :
>
> test/jdk/java/util/ServiceLoader/security/test/p/Tests.java
> 184 assertTrue(e.getCause() instanceof Error);
> I think it's more precise to check e.getCause().getClass() == Error.class.
>
You are right, that test should be improved, more so if each of cases 
throws a different error type.

While testing this, I ran into an issue with the JRE and CLDR locale 
providers adpaters - they silently swallow exceptions and so were 
silently consuming security exceptions thrown by tests in in other areas 
(logging and resource bundle tests mostly). I've created JDK-8189272 to 
track this and in the mean-time, these two adpaters need to re-throw the 
SCE when it's not for a security exception.

I've put the webrev with these changes here:
    http://cr.openjdk.java.net/~alanb/8189264/webrev/index.html

-Alan.



More information about the jigsaw-dev mailing list