On Fri, 20 Feb 2026 10:48:23 GMT, Casper Norrbin <[email protected]> wrote:

> Hi everyone,
> 
> In `ClassFileParser::verify_legal_class_modifiers`, the `valid_value_class` 
> bool had a redundant `!is_identity`. Since `is_identity` is already handled 
> by short-circuiting earlier in the expression, that condition is always true 
> in the remaining branch. This change removes the redundancy without changing 
> behavior.
> 
> Testing:
> - Tier 1

src/hotspot/share/classfile/classFileParser.cpp line 4513:

> 4511:       (!valid_value_class)) {
> 4512:     ResourceMark rm(THREAD);
> 4513:     const char* class_note = "";

This class_note variable controlled by valid_value_class is never used. Should 
we remove it? And the message would be wrong for the valid_value_class 
condition anyways because it allows ACC_IDENTITY.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2146#discussion_r2833415120

Reply via email to