RFR(M): 8199852: Print more information about class loaders in LinkageErrors.
David Holmes
david.holmes at oracle.com
Wed Mar 21 13:11:43 UTC 2018
Hi Goetz,
Can you provide a detailed comparison of all the before and after
messages please. It seems to me you are rewriting some of the messages
in a way that changes the meaning.
src/hotspot/share/classfile/systemDictionary.cpp
Before:
! linkage_error1 = "loader constraint violation: loader
(instance of ";
! linkage_error2 = ") previously initiated loading for a
different type with name \"";
after:
! linkage_error1 = "loader constraint violation: loader ";
! linkage_error2 = " wants to load class ";
! linkage_error3 = ". A different class with the same name was
previously loaded by ";
this does not describe the same situation!
Thanks,
David
On 21/03/2018 9:55 PM, Lindenmaier, Goetz wrote:
> Hi,
>
> ClassLoaders have a field containing a name since Java 9.
>
> This change improves some of the messages of LinkageErrors to
> print the name of the loader involved, as well as the parent of the loader.
> This simplifies tracking down the component causing an error in large
> Java systems.
>
> Please review:
> http://cr.openjdk.java.net/~goetz/wr18/8199852-exMsg_Linkage/01/index.html
>
> I ran this through all our tests (jck, jtreg, spec etc). I will run it through submit-hs
> (or jdk/submit) once it's reviewed.
>
> Best regards,
> Goetz.
>
>
>
>
More information about the hotspot-runtime-dev
mailing list