RFR(M): 8199852: Print more information about class loaders in LinkageErrors.
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Wed Mar 21 13:03:25 UTC 2018
Hi Lois,
Thanks for looking at this!
I had a look at Klass::class_loader_and_module_name(), but there are places
where you only want to report the class loader information, therefore I
decided to do it this way. (If you like this, I have more of these in work :)).
For example see expectedErrorMessageDuplicate1 in the test.
Also, there might just be a classloader at hand, not a class as needed
for that method.
But maybe it would make sense to call describe_external() in
class_loader_and_module_name() to get more information about
the classloader?
Best regards,
Goetz.
> -----Original Message-----
> From: Lois Foltan [mailto:lois.foltan at oracle.com]
> Sent: Mittwoch, 21. März 2018 13:22
> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; hotspot-runtime-
> dev at openjdk.java.net
> Subject: Re: RFR(M): 8199852: Print more information about class loaders in
> LinkageErrors.
>
> On 3/21/2018 7:55 AM, 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.
> >
> >
> >
> >
> Hi Goetz,
>
> This looks promising and something that we started to do in the JDK 9
> time frame. Instead of adding the new method
> java_lang_ClassLoader::describe_external() can you possible use/improve
> upon Klass::class_loader_and_module_name() in order to avoid duplicate
> code?
>
> Thanks,
> Lois
More information about the hotspot-runtime-dev
mailing list