[15] RFR JDK-8247785: Small clarification to the javadoc about builtin class loaders
Brent Christian
brent.christian at oracle.com
Tue Jun 23 19:15:28 UTC 2020
Hi, Mandy
For:
@@ -152,7 +152,7 @@
* The system class loader is typically used to define classes on the
* application class path, module path, and JDK-specific tools.
* The platform class loader is a parent or an ancestor of the
system class
- * loader that all platform classes are visible to it.</li>
+ * loader which searches and loads the platform classes through its
parent.</li>
* </ul>
*
IMO, the function of the platform class loader has already been outlined
in the previous bullet point, so the last sentence could be simplified
to something like:
"The system class loader's parent is the platform class loader"
or
"The parent of the system class loader is the platform class loader."
-Brent
On 6/23/20 12:01 PM, Roger Riggs wrote:
> Hi Mandy,
>
> There may be a missing "to" in:
>
> + * <em>Platform classes</em> are visible the platform class loader
> ++ * <em>Platform classes</em> are visible *via* the platform class
> loader
>
> The second change seems to be self referential using "parent" to define
> itself.
>
> And pre-existing in the description of getSystemClassLoader:
>
> * The platform class loader is a parent or an ancestor of the system
> class * loader that all platform classes are visible to it.
>
> Is missing "so" in :
>
> * loader so that all platform classes are visible to it.
>
> Both paragraphs are difficult to read and understand. ( I think the
> originals are more readable).
>
> Thanks, Roger
>
>
>
> On 6/23/20 2:23 PM, Alan Bateman wrote:
>> On 23/06/2020 19:03, Mandy Chung wrote:
>>> Small clarification about the parent of the system class loader in
>>> the ClassLoader class
>>> spec:
>>>
>>>
>>> diff --git a/src/java.base/share/classes/java/lang/ClassLoader.java
>>> b/src/java.base/share/classes/java/lang/ClassLoader.java
>>> --- a/src/java.base/share/classes/java/lang/ClassLoader.java
>>> +++ b/src/java.base/share/classes/java/lang/ClassLoader.java
>>> @@ -133,7 +133,7 @@
>>> * It is the virtual machine's built-in class loader, typically
>>> represented
>>> * as {@code null}, and does not have a parent.</li>
>>> * <li><p>{@linkplain #getPlatformClassLoader() Platform class loader}.
>>> - * All <em>platform classes</em> are visible to the platform
>>> class loader
>>> + * <em>Platform classes</em> are visible the platform class loader
>>> * that can be used as the parent of a {@code ClassLoader}
>>> instance.
>>> * Platform classes include Java SE platform APIs, their
>>> implementation
>>> * classes and JDK-specific run-time classes that are defined by
>>> the
>>> @@ -152,7 +152,7 @@
>>> * The system class loader is typically used to define classes
>>> on the
>>> * application class path, module path, and JDK-specific tools.
>>> * The platform class loader is a parent or an ancestor of the
>>> system class
>>> - * loader that all platform classes are visible to it.</li>
>>> + * loader which searches and loads the platform classes through
>>> its parent.</li>
>>> * </ul>
>>> *
>>> * <p> Normally, the Java virtual machine loads classes from the
>>> local file
>> I think this looks okay.
>>
>> -Alan
>
More information about the core-libs-dev
mailing list