RFR(S): 8217512: Message of LinkageError: use 'class' etc. instead of 'type'
Lois Foltan
lois.foltan at oracle.com
Tue Jan 22 18:37:19 UTC 2019
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