RFR: 8302791: Add specific ClassLoader object to Proxy IllegalArgumentException message [v3]
Ravali Yatham
duke at openjdk.org
Wed Mar 1 07:16:07 UTC 2023
On Wed, 22 Feb 2023 07:24:48 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Ravali Yatham has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix Indentation
>
> src/java.base/share/classes/java/lang/reflect/Proxy.java line 881:
>
>> 879: if (type != c) {
>> 880: throw new IllegalArgumentException(c.getName() +
>> 881: " referenced from a method is not visible from class loader: " + ld);
>
> The ClassLoader string representation may or may not be useful here. One suggestion is to use the class loader name (ld.getName()) if not null, otherwise Objects.toIdentityString(ld).
@AlanBateman @mlchung - Thanks for reviewing. I've incorporated review comments wherein using `<loader-name>@<id>` if not null, otherwise `Objects.toIdentityString(ld)`. PTAL.
-------------
PR: https://git.openjdk.org/jdk/pull/12641
More information about the core-libs-dev
mailing list