RFR(S): 8217512: Message of LinkageError: use 'class' etc. instead of 'type'
David Holmes
david.holmes at oracle.com
Tue Jan 22 12:14:24 UTC 2019
Hi Goetz,
On 22/01/2019 9:59 pm, 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).
That detail wasn't clear from the bug report. :)
Replacing "type" with the actual type seems fine. I'm a little surprised
only one test needs adjusting though.
Thanks,
David
> 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