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 looks right and hopefully @vicente-romero-oracle can review. (The duplicate warning will be one of the first things that developers see when they try value classes so important to get this fixed) ------------- Marked as reviewed by alanb (no project role). PR Review: https://git.openjdk.org/valhalla/pull/2570#pullrequestreview-4560544545
