RFR 8202913: loader constraint message for fields specifies incorrect referring class
Harold David Seigel
harold.seigel at oracle.com
Fri May 25 13:28:33 UTC 2018
Hi,
Please review this change to correct and simplify the error message
displayed when a loader constraint check fails when trying to access a
field.
The old message (for this test case):
loader constraint violation: when resolving field "_field1" the
class loader "<unnamed>" (instance of ClassLoaderForChildGrandFoo,
child of "app" jdk.internal.loader.ClassLoaders$AppClassLoader) of
the referring class, Parent, and the class loader "<unnamed>"
(instance of ClassLoaderForParentFoo, child of "app"
jdk.internal.loader.ClassLoaders$AppClassLoader) for the field's
resolved type, Foo, have different Class objects for that type
The new message:
loader constraint violation: when resolving field "_field1" of type
Foo, the class loader "<unnamed>" (instance of
ClassLoaderForChildGrandFoo, child of "app"
jdk.internal.loader.ClassLoaders$AppClassLoader) of the current
class, Child, and the class loader "<unnamed>" (instance of
ClassLoaderForParentFoo, child of "app"
jdk.internal.loader.ClassLoaders$AppClassLoader) for the field's
defining type, Parent, have different Class objects for type Foo
Open Webrev: http://cr.openjdk.java.net/~hseigel/bug_8202913/webrev/
JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8202913
This fix was tested with Mach5 tiers 1 and 2 tests and builds on
Linux-X64, Windows, Solaris Sparc, and Mac OS X, with tiers 3-5 tests on
Linux-x64, and with JCK-11 Lang and VM tests.
Thanks, Harold
More information about the hotspot-runtime-dev
mailing list