[lworld] RFR: 8376430: [lworld] Remove Modifier.IDENTITY
Chen Liang
liach at openjdk.org
Tue Jan 27 05:16:13 UTC 2026
`java.lang.reflect.Modifier` represents Java language modifiers. Since a previous iteration of JEP 401, the "identity" source modifier is removed, and only "value" source modifier exists. As a result, "identity" is no longer qualified to be present in `Modifier`. We should migrate all its uses to `ClassFile.ACC_IDENTITY` or `AccessFlag.IDENTITY` (which already correctly identifies itself not as a source modifier).
This also avoids the headache of `Modifier.toString` clashing over `SYNCHRONIZED` versus `IDENTITY`.
-------------
Commit messages:
- Purge Modifier.IDENTITY
Changes: https://git.openjdk.org/valhalla/pull/1980/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1980&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8376430
Stats: 109 lines in 10 files changed: 12 ins; 30 del; 67 mod
Patch: https://git.openjdk.org/valhalla/pull/1980.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1980/head:pull/1980
PR: https://git.openjdk.org/valhalla/pull/1980
More information about the valhalla-dev
mailing list