RFR: 8228773: URLClassLoader constructors should include API note warning that the parent should not be null [v2]
Jaikiran Pai
jpai at openjdk.org
Thu May 29 13:23:43 UTC 2025
On Thu, 29 May 2025 08:00:40 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Alan's suggestion - replace default delegation class loader with system class loader
>
> src/java.base/share/classes/java/net/URLClassLoader.java line 98:
>
>> 96: * Constructs a new URLClassLoader for the specified URLs using the
>> 97: * {@linkplain ClassLoader#getSystemClassLoader() default delegation
>> 98: * parent class loader}. The URLs will be searched in the order
>
> As we are changing it then maybe we could change this to "using the system class loader as the parent". I think that would be much clearer than "default delegation parent ...". Same thing in SecureClassLoader.
Done - updated these 2 places to use the "system class loader" reference.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25517#discussion_r2113928114
More information about the net-dev
mailing list