Alan.Bateman at oracle.com
Wed Aug 31 11:12:32 UTC 2016
On 31/08/2016 11:33, Richard Opalka wrote:
> Hi Jigsaw Team,
> There's new ClassLoader::getPlatformClassLoader() method introduced
> with project Jigsaw.
> There are three ClassLoader::getSystemResource*() methods available
> that fallback to BootLoader if SystemClassLoader is not available.
> Shouldn't ClassLoader::getPlatformResource*() methods be defined as well
> providing similar fallback mechanism?
ClassLoader.getSystemClassLoader() should never return null. I see we
have a few residual places that still check for null so some clean-up
needed. The @return description also needs clean-up.
So I'm curious if you have a scenario where there is no system class
loader. Is this instrumentation early in the startup or something
reading a private field, again during early startup, rather than calling
the getSystemClassLoader method?
As regards the platform class loader then
ClassLoader.getPlatformClassLoader().getResourceXXX should be the
equivalent of introducing new methods so it hardly seems worth it.
More information about the jigsaw-dev