On Sun, 21 Jun 2026 20:01:41 GMT, Chen Liang <[email protected]> wrote:

> `isValueModifier()` is called twice in `JavacParser`, both calls are 
> immediately followed by a `checkSourceLevel(Feature.VALUE_CLASSES);` when 
> they return true. We can remove this redundant check here, because similar 
> checks for sealed classes, etc. are done outside of modifier detection, too.
> 
> Credit to Alan Bateman for discovering this issue.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: e614970e
Author:    Chen Liang <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/e614970e32c606d93cda334a5f0b88713d5eb402
Stats:     13 lines in 3 files changed: 12 ins; 1 del; 0 mod

8386995: [lworld] Duplicate value classes are a preview feature warning

Reviewed-by: alanb, vromero

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

PR: https://git.openjdk.org/valhalla/pull/2570

Reply via email to