RFR: JDK-8210009: Source Launcher classloader should support getResource and getResourceAsStream
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Sep 4 20:52:52 UTC 2018
Please review a change to add support for the getResource* group of methods
to the internal class loader used by the Source Launcher, introduced in
JEP 330.
The overall issue has been discussed on OpenJDK lists, [1,2]
The implementation consists of providing findResource and findResources,
along with a couple of minor additional classes to implement
URLStreamHandler
and URLConnection.
There is one implementation detail worthy of note. The "new URL" should
be inside a doPrivileged block, but overall, the Source Launcher does not
work when a security manager in installed. This is being tracked as
JDK-8210274,
and the appropriate doPrivileged call will be added as part of that fix.
-- Jon
JBS: https://bugs.openjdk.java.net/browse/JDK-8210009
Webrev: http://cr.openjdk.java.net/~jjg/8210009/webrev.01/
[1]
http://mail.openjdk.java.net/pipermail/compiler-dev/2018-August/012294.html
[2]
http://mail.openjdk.java.net/pipermail/core-libs-dev/2018-August/055001.html
More information about the compiler-dev
mailing list