tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55943] Provide a way prevent looking at the System classloader before the webapp classloaders
Date Wed, 01 Jan 2014 11:24:58 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55943

--- Comment #1 from Mark Thomas <markt@apache.org> ---
If this change were to be implemented then it should be implemented the same
way as the delegate flag since that controls a similar behaviour. I'd lean
towards to boolean flag that simply disabled the code block (0.2) that checked
the system class loader.

Note that the system class loader is checked first to enforce the specification
requirement that web applications must not be allowed to override Java SE
platform classes. I'd hesitate before adding an option to disable this check
because of the specification requirement.

I wonder if there isn't a better solution to this issue. The system class
loader might not be the best class loader to use here. It is really the
bootstrap class loader that is required but you can't get a reference to that
in some JREs - including Oracle's. The class loader hierarchy for an Oracle JVM
is system->ext->bootstrap so using the ext class loader would work in that
case.

I'm thinking that rather than using the system class loader in this case the
parent of the system class loader should be used (if it has one). That should
both fix this issue and still enforce the specification requirement for not
allowing the overriding of Java SE platformclasses.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message