> In project valhalla development, we discovered that `Modifier.toString` > becomes more problematic than helpful: there's now a mix-and-match of > modifiers from access flags and other class file sources, for example, > classes now can have ACC_IDENTITY, which clashes with ACC_SYNCHRONIZED, and > the correct modifier to reflect, "value", must be deduced by the users > manually. > > With fewer bits available for the access flags, it becomes more apparent that > future source modifiers will no longer be reflected by `Modifier.toString`, > and future access flags are more likely to be reflected incorrectly. Thus, we > should dissuade users from this API in the long run. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Chen Liang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision: - Review remarks - Merge branch 'master' of https://github.com/openjdk/jdk into fix/deprecate-modifier-tostring - Revision after CSR review - Merge branch 'master' of https://github.com/openjdk/jdk into fix/deprecate-modifier-tostring - Fix failing test, typos - Merge branch 'master' of https://github.com/openjdk/jdk into fix/deprecate-modifier-tostring - Missed comment - Revisions - Merge branch 'master' of https://github.com/openjdk/jdk into fix/deprecate-modifier-tostring - Merge branch 'master' of https://github.com/openjdk/jdk into fix/deprecate-modifier-tostring - ... and 2 more: https://git.openjdk.org/jdk/compare/939e3d67...f67ea0ae ------------- Changes: - all: https://git.openjdk.org/jdk/pull/30093/files - new: https://git.openjdk.org/jdk/pull/30093/files/82de4f11..f67ea0ae Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=30093&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=30093&range=03-04 Stats: 1782 lines in 85 files changed: 792 ins; 688 del; 302 mod Patch: https://git.openjdk.org/jdk/pull/30093.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30093/head:pull/30093 PR: https://git.openjdk.org/jdk/pull/30093
