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

mandy chung mandy.chung at oracle.com
Fri Oct 13 17:36:14 UTC 2017



On 10/13/17 6:51 AM, Alan Bateman wrote:
> 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.
>

The test update looks good.

> 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

+1

Throwing SCE if not caused for security is okay for this patch.   I 
agree that if there is any problem loading these providers, it should be 
made fatal and JDK-8189272 should consider that.

Mandy


More information about the jigsaw-dev mailing list