RFR: JDK-8281000 ClassLoader::registerAsParallelCapable throws NPE if caller is null

Alan Bateman alanb at openjdk.java.net
Sat Feb 12 15:20:01 UTC 2022


On Fri, 11 Feb 2022 23:25:44 GMT, Brent Christian <bchristi at openjdk.org> wrote:

> Having a second thought, since this API expects to be called by a class loader, I think throwing `IllegalCallerException` to indicate this method is called by an illegal caller. This will need a CSR due to the spec change.

I think this would work for both the "no caller" case and also the case where there is reflection hackery calling this method from somewhere other than a ClassLoader. So it would be a small change in behavior from CCE to ICE.

-------------

PR: https://git.openjdk.java.net/jdk/pull/7448


More information about the core-libs-dev mailing list