New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8241151: Incorrect lint warning for no definition of serialVersionUID in a record #363
8241151: Incorrect lint warning for no definition of serialVersionUID in a record #363
Conversation
… in a record Co-authored-by: Bernard Blaser <bsrbnd@gmail.com> Co-authored-by: Vicente Romero <vicente.romero@oracle.com>
/test tier1 |
👋 Welcome back vromero! A progress list of the required criteria for merging this PR into |
@vicente-romero-oracle The following label will be automatically applied to this pull request: When this pull request is ready to be reviewed, an RFR email will be sent to the corresponding mailing list. If you would like to change these labels, use the |
Webrevs
|
Could not create test job |
/test tier1 |
Could not create test job |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add a bug number to the test.
public RecordCompilationTests() { | ||
boolean useAP = System.getProperty("useAP") == null ? false : System.getProperty("useAP").equals("true"); | ||
useAP = System.getProperty("useAP") == null ? false : System.getProperty("useAP").equals("true"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is unrelated to your change, but this line could be improved with
useAP = System.getProperty("useAP", "false").equals("true")
/test |
@vicente-romero-oracle 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 more 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 27 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 |
/contributor add Bernard Blaser bsrbnd@gmail.com |
/contributor add Vicente Romero vicente.romero@oracle.com |
@vicente-romero-oracle |
/integrate |
@vicente-romero-oracle |
@vicente-romero-oracle Since your change was applied there have been 27 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit ac15d64. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Could not create test job |
public RecordCompilationTests() { | ||
boolean useAP = System.getProperty("useAP") == null ? false : System.getProperty("useAP").equals("true"); | ||
useAP = System.getProperty("useAP", "false").equals("true"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't Boolean.getBoolean("useAP")
be used here instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be used, but the test could potentially be executed from command line too and there is no guarantee that the system property will be there if executed from the command line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand, call to Boolean.getBoolean("useAP")
is identical to your variant as it also relies on System#getProperty(String)
so I cannot see any different behaviour if using it:
jdk/src/java.base/share/classes/java/lang/Boolean.java
Lines 272 to 279 in 8df3e72
public static boolean getBoolean(String name) { | |
boolean result = false; | |
try { | |
result = parseBoolean(System.getProperty(name)); | |
} catch (IllegalArgumentException | NullPointerException e) { | |
} | |
return result; | |
} |
Mailing list message from Jonathan Gibbons on compiler-dev: Yes, Boolean.getBoolean could have been used, but to be accurate, the -- Jon On 9/29/20 3:16 PM, PROgrm_JARvis wrote: |
Co-authored-by: Bernard Blaser bsrbnd@gmail.com
Co-authored-by: Vicente Romero vicente.romero@oracle.com
Progress
Issue
Reviewers
Contributors
<bsrbnd@gmail.com>
<vicente.romero@oracle.com>
Download
$ git fetch https://git.openjdk.java.net/jdk pull/363/head:pull/363
$ git checkout pull/363