8019622: (sl) ServiceLoadet.next incorrect when creation and usages are in different contexts

Alan Bateman Alan.Bateman at oracle.com
Wed Jul 3 16:15:02 UTC 2013


When running with a security manager, ServiceLoader isn't currently very 
predictable when created and used in different contexts. For the 
ServiceLoader usages in the JDK then isn't a problem because all (bar 
one or two uninteresting cases) involve creating the ServiceLoader and 
immediately iterating over the providers. However for other usages then 
it may be an issue as the iteration over the providers may or may not 
have the expected permissions. The webrev with the proposed changes is here:

http://cr.openjdk.java.net/~alanb/8019622/webrev/

Mandy - this is one that we've chatted about a few times so you are 
probably the best to review it (if you have time of course).

-Alan.



More information about the core-libs-dev mailing list