RFR: 8367368: Add message for verify_legal_class_modifiers for inner classes

David Holmes dholmes at openjdk.org
Thu Sep 11 02:27:09 UTC 2025


On Thu, 11 Sep 2025 00:46:42 GMT, Chen Liang <liach at openjdk.org> wrote:

> 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.

Generally speaking we try not to "tutorialize" these kinds of errors. They should only arise from people using specially crafted , invalid, bytecode, and we expect the originators of that code to be able to understand what they did wrong.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27201#issuecomment-3277140270


More information about the hotspot-dev mailing list