Request for Review: minor VM class loading change

David M. Lloyd david.lloyd at redhat.com
Mon May 21 08:18:48 PDT 2012


On 05/17/2012 12:25 PM, Alan Bateman wrote:
> On 17/05/2012 18:03, David M. Lloyd wrote:
>>
>> So is the ultimate goal then to move away from having JDK classes
>> always return null for getClassLoader()? Or will that behavior remain?
> When running with a classpath then everything should work as it does
> today and so it should return null.

So Jigsaw is sticking to the two-mode thing then?

> When running with modules then the question splits into a question for
> classes loaded by the "base" module and classes in other platform
> modules (all would previously have been loaded by the bootstrap class
> loader and so getClassLoader would have returned null). For the classes
> in the base module then it's still an open question and there are good
> questions to have it return a module class loader even though they are
> actually loaded by the VM built-in bootstrap loader.

In this case, are there any observable differences between having the 
getClassLoader() method "lie" in this way and having the initiating 
class loader actually *be* the module class loader?

> For classes in other modules then getClassLoader will return the appropriate
> ModuleClassLoader for that module.
>
> -Alan
>


-- 
- DML



More information about the jigsaw-dev mailing list