8376430: [lworld] Remove Modifier.IDENTITY#1980
8376430: [lworld] Remove Modifier.IDENTITY#1980liach wants to merge 4 commits intoopenjdk:lworldfrom
Conversation
|
👋 Welcome back liach! A progress list of the required criteria for merging this PR into |
|
@liach This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
| * For all other {@code Class} objects, this method returns {@code true} if either | ||
| * preview features are disabled or {@linkplain Modifier#IDENTITY} is set in the | ||
| * preview features are disabled or {@linkplain ClassFile#ACC_IDENTITY} is set in the | ||
| * {@linkplain #getModifiers() class modifiers}. |
There was a problem hiding this comment.
Change "class modifiers" to "access flags" (or equivalent) or line 644.
| * For all other {@code Class} objects, this method returns {@code true} only if | ||
| * preview features are enabled and {@linkplain Modifier#IDENTITY} is not set in the | ||
| * preview features are enabled and {@linkplain ClassFile#ACC_IDENTITY} is not set in the | ||
| * {@linkplain #getModifiers() class modifiers}. |
|
At a high-level, I concur that removing IDENTITY from Modifiers is the correct direction. The toString() methods of classes, or other affected constructs, can be updated to still print out source-level information even when the language and VM model a concept differently. |
|
Thanks for the reviews! Tier 1-2 passed. /integrate |
|
Going to push as commit 0f2f43b.
Your commit was automatically rebased without conflicts. |
java.lang.reflect.Modifierrepresents 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 inModifier. We should migrate all its uses toClassFile.ACC_IDENTITYorAccessFlag.IDENTITY(which already correctly identifies itself not as a source modifier).This also avoids the headache of
Modifier.toStringclashing overSYNCHRONIZEDversusIDENTITY.Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1980/head:pull/1980$ git checkout pull/1980Update a local copy of the PR:
$ git checkout pull/1980$ git pull https://git.openjdk.org/valhalla.git pull/1980/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1980View PR using the GUI difftool:
$ git pr show -t 1980Using diff file
Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1980.diff
Using Webrev
Link to Webrev Comment