JDK-8312415: Expand -Xlint:serial checks to enum constants with specialized class bodies#15004
JDK-8312415: Expand -Xlint:serial checks to enum constants with specialized class bodies#15004jddarcy wants to merge 3 commits intoopenjdk:masterfrom
Conversation
…alized class bodies
|
👋 Welcome back darcy! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
|
||
| case ENUM_CONSTANT -> { | ||
| var field = (VarSymbol)enclosed; | ||
| if (field.isEnum()) { |
There was a problem hiding this comment.
It's not wrong, but is this check redundant? When can an ENUM_CONSTANT not be isEnum() ?
There was a problem hiding this comment.
See these lines in Symbol.java public ElementKind getKind() line 1725:
} else if ((flags & ENUM) != 0) {
return ElementKind.ENUM_CONSTANT;
There was a problem hiding this comment.
Yes, sorry for that, I've originally had the code elsewhere. The isEnum check should not be needed here.
There was a problem hiding this comment.
Code updated; all langtools tests pas when run locally. Thanks.
jonathan-gibbons
left a comment
There was a problem hiding this comment.
Approved, but see question for Check.java
|
@jddarcy 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 13 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
|
||
| case ENUM_CONSTANT -> { | ||
| var field = (VarSymbol)enclosed; | ||
| if (field.isEnum()) { |
There was a problem hiding this comment.
Yes, sorry for that, I've originally had the code elsewhere. The isEnum check should not be needed here.
|
/integrate |
|
Going to push as commit cb82c95.
Your commit was automatically rebased without conflicts. |
Thanks to @lahodaj for providing the code to bridge into the class used for a enum constant with a specialized body.
This changes expands serialization warnings to the contents of any such class bodies.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15004/head:pull/15004$ git checkout pull/15004Update a local copy of the PR:
$ git checkout pull/15004$ git pull https://git.openjdk.org/jdk.git pull/15004/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15004View PR using the GUI difftool:
$ git pr show -t 15004Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15004.diff
Webrev
Link to Webrev Comment