Skip to content
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

Closed

Conversation

vicente-romero-oracle
Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle commented Sep 25, 2020

Co-authored-by: Bernard Blaser bsrbnd@gmail.com
Co-authored-by: Vicente Romero vicente.romero@oracle.com


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8241151: Incorrect lint warning for no definition of serialVersionUID in a record

Reviewers

Contributors

  • Bernard Blaser <bsrbnd@gmail.com>
  • Vicente Romero <vicente.romero@oracle.com>

Download

$ git fetch https://git.openjdk.java.net/jdk pull/363/head:pull/363
$ git checkout pull/363

… in a record

Co-authored-by: Bernard Blaser <bsrbnd@gmail.com>
Co-authored-by: Vicente Romero <vicente.romero@oracle.com>
@vicente-romero-oracle
Copy link
Contributor Author

/test tier1

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 25, 2020

👋 Welcome back vromero! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 25, 2020
@openjdk
Copy link

openjdk bot commented Sep 25, 2020

@vicente-romero-oracle The following label will be automatically applied to this pull request: compiler.

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 /label (add|remove) "label" command.

@openjdk openjdk bot added the compiler compiler-dev@openjdk.org label Sep 25, 2020
@mlbridge
Copy link

mlbridge bot commented Sep 25, 2020

Webrevs

@openjdk
Copy link

openjdk bot commented Sep 25, 2020

Could not create test job

@vicente-romero-oracle
Copy link
Contributor Author

/test tier1

@openjdk
Copy link

openjdk bot commented Sep 28, 2020

Could not create test job

Copy link
Contributor

@jonathan-gibbons jonathan-gibbons left a 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");
Copy link
Contributor

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")

@vicente-romero-oracle
Copy link
Contributor Author

/test

@openjdk
Copy link

openjdk bot commented Sep 28, 2020

@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:

8241151: Incorrect lint warning for no definition of serialVersionUID in a record

Co-authored-by: Bernard Blaser <bsrbnd@gmail.com>
Co-authored-by: Vicente Romero <vicente.romero@oracle.com>
Reviewed-by: jjg

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 master branch:

  • d25b03e: 8253616: Change to GCC 10.2 for building on Linux at Oracle
  • 821bd08: 8253667: ProblemList tools/jlink/JLinkReproducible{,3}Test.java on linux-aarch64
  • 1ae6b53: 8252194: Add automated test for fix done in JDK-8218469
  • 77a0f39: 8253540: InterpreterRuntime::monitorexit should be a JRT_LEAF function
  • 0054c15: 8253435: Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist
  • 8e338f6: 8253646: ZGC: Avoid overhead of sorting ZStatIterableValues on bootstrap
  • ec9bee6: 8253015: Aarch64: Move linux code out from generic CPU feature detection
  • 16b8c39: 8253053: Javadoc clean up in Authenticator and BasicAuthenicator
  • 840aa2b: 8253424: Add support for running pre-submit testing using GitHub Actions
  • 8e87d46: 8252857: AArch64: Shenandoah C1 CAS is not sequentially consistent
  • ... and 17 more: https://git.openjdk.java.net/jdk/compare/a75edc29c6ce41116cc99530aa1710efb62c6d5a...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 28, 2020
@vicente-romero-oracle
Copy link
Contributor Author

/contributor add Bernard Blaser bsrbnd@gmail.com

@vicente-romero-oracle
Copy link
Contributor Author

/contributor add Vicente Romero vicente.romero@oracle.com

@openjdk
Copy link

openjdk bot commented Sep 28, 2020

@vicente-romero-oracle
Contributor Bernard Blaser <bsrbnd@gmail.com> successfully added.

@vicente-romero-oracle
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 28, 2020

@vicente-romero-oracle
Contributor Vicente Romero <vicente.romero@oracle.com> successfully added.

@openjdk openjdk bot closed this Sep 28, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 28, 2020
@openjdk
Copy link

openjdk bot commented Sep 28, 2020

@vicente-romero-oracle Since your change was applied there have been 27 commits pushed to the master branch:

  • d25b03e: 8253616: Change to GCC 10.2 for building on Linux at Oracle
  • 821bd08: 8253667: ProblemList tools/jlink/JLinkReproducible{,3}Test.java on linux-aarch64
  • 1ae6b53: 8252194: Add automated test for fix done in JDK-8218469
  • 77a0f39: 8253540: InterpreterRuntime::monitorexit should be a JRT_LEAF function
  • 0054c15: 8253435: Cgroup: 'stomping of _mount_path' crash if manually mounted cpusets exist
  • 8e338f6: 8253646: ZGC: Avoid overhead of sorting ZStatIterableValues on bootstrap
  • ec9bee6: 8253015: Aarch64: Move linux code out from generic CPU feature detection
  • 16b8c39: 8253053: Javadoc clean up in Authenticator and BasicAuthenicator
  • 840aa2b: 8253424: Add support for running pre-submit testing using GitHub Actions
  • 8e87d46: 8252857: AArch64: Shenandoah C1 CAS is not sequentially consistent
  • ... and 17 more: https://git.openjdk.java.net/jdk/compare/a75edc29c6ce41116cc99530aa1710efb62c6d5a...master

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.

@vicente-romero-oracle vicente-romero-oracle deleted the JDK-8241151 branch September 28, 2020 21:22
@openjdk
Copy link

openjdk bot commented Sep 28, 2020

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");
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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:

public static boolean getBoolean(String name) {
boolean result = false;
try {
result = parseBoolean(System.getProperty(name));
} catch (IllegalArgumentException | NullPointerException e) {
}
return result;
}

@mlbridge
Copy link

mlbridge bot commented Sep 29, 2020

Mailing list message from Jonathan Gibbons on compiler-dev:

Yes, Boolean.getBoolean could have been used, but to be accurate, the
behavior is not identical, and given this is just test code that has
already been integrated, I don't see the point in changing it.

-- Jon

On 9/29/20 3:16 PM, PROgrm_JARvis wrote:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants