RFR: 8367368: Add message for verify_legal_class_modifiers for inner classes
Coleen Phillimore
coleenp at openjdk.org
Thu Sep 11 12:34:15 UTC 2025
On Thu, 11 Sep 2025 00:46:42 GMT, Chen Liang <liach at openjdk.org> wrote:
>> This adds the inner class name (or unnamed) to the error message for invalid inner class modifiers.
>> Testing with tier1-4.
>
> I think for inner class errors, instead of reporting inner simple name, we should report:
> 1. offending class file
> 2. the inner class class constant. It is the only identification part that must be present.
> 3. the offending data, such as bad flags
>
> What do you think? The inner class constant is universal because outer class is absent for anonymous/local classes and simple name is absent for anonymous classes.
@liach Most of this information is in the message now, except class file name but we don't usually print that.
$ java Outer
Error: LinkageError occurred while loading main class Outer
java.lang.ClassFormatError: Illegal class modifiers in inner class Inner of class Outer: 0x63F
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27201#issuecomment-3280379642
More information about the hotspot-dev
mailing list