ClassLoader.getParent to throw exception for module classloader

Paul Sandoz paul.sandoz at oracle.com
Fri Jun 22 02:26:36 PDT 2012


On Jun 22, 2012, at 2:00 AM, David Holmes wrote:

> On 22/06/2012 2:03 AM, Paul Sandoz wrote:
>> Hi,
>> 
>> http://cr.openjdk.java.net/~psandoz/jigsaw/classloader-getparent/webrev/
>> 
>> In a off-list discussion there was a side comment about making ClassLoader.getParent throwing an exception for a module class loader. This type of thing is easy to loose so marking this down in email.
> 
> So that would seem to have far-reaching consequences on various bits of code that check the classloader hierarchy to determine when they need to do security manager checks.
> 

Indeed. All such JDK related code needs to be reviewed.


> This leaves me wondering how custom classloaders fit into this world - do they have a parent that is a module loader?
> 

Yes.

Paul.


More information about the jigsaw-dev mailing list