RFR 8191173 : (cl) Clarify or remove "for delegation" in ClassLoader spec
mandy.chung at oracle.com
Fri Nov 24 00:56:29 UTC 2017
On 11/21/17 12:41 PM, Brent Christian wrote:
> Please review my change to this small bit of ClassLoader spec that can
> be tidied up, as noticed by Martin.
> In java.lang.ClassLoader these methods:
> all state that the returned classloader is, "for delegation."
> For getParent() this makes sense to mention. But it seems unnecessary
> for the other two methods, which are static, and designed to always
> return the indicated classloader. The getSystemClassLoader() docs go
> on to immediately mention that the system classloader is the default
> delegation parent.
As Alan points out, the parent class loader is only used for delegation
when that class loader follows the delegation model. The getParent
method as well as the constructors could be made clear but I would leave
it as is.
More information about the core-libs-dev