On 10/12/17 2:11 PM, Alan Bateman wrote:
There are are two issues in ServiceLoader that we crept in with
re-write here in JDK 9. One is with the new stream method where the
Provider elements are specified to be cached but the implementation
dropped it in the final version. The second is specific to the
security manager scenario where errors encountered loading or
initializing providers (a static initializer throws an error for
example) aren't wrapped with the ServiceConfigurationError.
The changes to address these issues are trivial and I'd like to get
them fixed in jdk10/master:
http://cr.openjdk.java.net/~alanb/8186738/webrev/index.html
Looks good in general.
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.
Mandy