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

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

Commit messages:
 - Warn value class preview only once

Changes: https://git.openjdk.org/valhalla/pull/2570/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2570&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8386995
  Stats: 13 lines in 3 files changed: 12 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/valhalla/pull/2570.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2570/head:pull/2570

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

Reply via email to