RFR(S): 8217512: Message of LinkageError: use 'class' etc. instead of 'type'

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Wed Jan 23 07:13:07 UTC 2019


Hi Lois, 

thanks for looking at this!

Best regards,
  Goetz.

> -----Original Message-----
> From: Lois Foltan <lois.foltan at oracle.com>
> Sent: Dienstag, 22. Januar 2019 19:37
> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; hotspot-runtime-
> dev at openjdk.java.net
> Subject: Re: RFR(S): 8217512: Message of LinkageError: use 'class' etc. instead
> of 'type'
> 
> Looks good!
> Lois
> 
> On 1/22/2019 6:59 AM, Lindenmaier, Goetz wrote:
> > Hi,
> >
> > I would like to change 'type' to 'class' in the following exception text:
> > (class will be replaced by 'interface' ... etc depending on the actual type).
> >
> > old:
> >
> > java.lang.LinkageError: loader constraint violation:
> >   when resolving field "_field1" of type pkg.Foo,
> > the class loader pkg.ClassLoaderForChildGrandFoo @42b2e259 of the
> current class, pkg.Child,
> >   and the class loader pkg.ClassLoaderForParentFoo @4b55c90f for the field's
> defining type, pkg.Parent,
> > have different Class objects for type pkg.Foo
> >   (pkg.Child is in unnamed module of loader
> pkg.ClassLoaderForChildGrandFoo @42b2e259, parent loader 'app';
> >    pkg.Parent is in unnamed module of loader pkg.ClassLoaderForParentFoo
> @4b55c90f, parent loader 'app')
> >
> > new:
> >
> > java.lang.LinkageError: loader constraint violation:
> >   when resolving field "_field1" of type pkg.Foo,
> > the class loader pkg.ClassLoaderForChildGrandFoo @42b2e259 of the
> current class, pkg.Child,
> >   and the class loader pkg.ClassLoaderForParentFoo @4b55c90f for the field's
> defining class, pkg.Parent,
> > have different Class objects for type pkg.Foo
> >   (pkg.Child is in unnamed module of loader
> pkg.ClassLoaderForChildGrandFoo @42b2e259, parent loader 'app';
> >    pkg.Parent is in unnamed module of loader pkg.ClassLoaderForParentFoo
> @4b55c90f, parent loader 'app')
> >
> > I think this makes the text better understandable: 'type' is used where the
> declared type of _field1
> > is meant. 'class' is used whenever we address the "defining type", i.e. the
> class that 'has' the
> > field, is meant.
> >
> > Please review:
> > http://cr.openjdk.java.net/~goetz/wr19/8217512-LinkageE_tiny/01/
> >
> > Best regards,
> >    Goetz.
> >



More information about the hotspot-runtime-dev mailing list