RFR: 8367368: Add message for verify_legal_class_modifiers for inner classes
Chen Liang
liach at openjdk.org
Thu Sep 11 00:40:15 UTC 2025
On Wed, 10 Sep 2025 18:38:56 GMT, Coleen Phillimore <coleenp 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.
test/hotspot/jtreg/runtime/InnerClassesAttr/TestInnerClassAccessFlagErrorMessage.java line 58:
> 56: } catch (ClassFormatError err) {
> 57: System.out.println(err.getMessage());
> 58: assertEquals(err.getMessage(), msg2);
I recommend testing against message fragment to ensure the class name is included without asserting the whole message, to allow more freedom in error messages while retaining desired info.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27201#discussion_r2338233277
More information about the hotspot-dev
mailing list