Skip to content

Conversation

@archiecobbs
Copy link
Contributor

@archiecobbs archiecobbs commented Nov 2, 2024

Please review this patch which removes unnecessary @SuppressWarnings annotations.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8343479: Remove unnecessary @SuppressWarnings annotations (hotspot) (Sub-task - P5)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21853/head:pull/21853
$ git checkout pull/21853

Update a local copy of the PR:
$ git checkout pull/21853
$ git pull https://git.openjdk.org/jdk.git pull/21853/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21853

View PR using the GUI difftool:
$ git pr show -t 21853

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21853.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 2, 2024

👋 Welcome back acobbs! 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
Copy link

openjdk bot commented Nov 2, 2024

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

8343479: Remove unnecessary @SuppressWarnings annotations (hotspot)

Reviewed-by: chagedorn, epeter

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 142 new commits pushed to the master branch:

  • 48223f7: 8344143: Test jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java timed out on macosx-x64
  • d4cd27e: 8344445: MethodCounters don't need a vptr
  • dc940ec: 8344387: RISC-V: C2: Improve encoding of LoadNKlass for compact headers
  • ded01e4: 8344327: SM cleanup in jdk.unsupported ReflectionFactory
  • 59fcfae: 8343129: Disable unstable check of ThreadsListHandle.sanity_vm ThreadList values
  • 1717946: 8344302: G1: Refactor G1CMTask::do_marking_step to use smaller wrapper methods
  • fea5f2b: 8344415: Restruct jpackage utility classes
  • a28e4d8: 8342299: Document that jpackage includes (possibly old) VC Redistributable MSVCP140.dll from JDK
  • 0714114: 8344322: Improve capabilities of jpackage test lib to validate error output of jpackage
  • 41436bb: 8336087: Doccheck: the jpackage command page doesn't show the correct command-line options
  • ... and 132 more: https://git.openjdk.org/jdk/compare/c00e20c399cf9b3b21258bd5654a92d703c8fcd2...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 rfr Pull request is ready for review label Nov 2, 2024
@openjdk
Copy link

openjdk bot commented Nov 2, 2024

@archiecobbs The following labels will be automatically applied to this pull request:

  • graal
  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added graal graal-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org labels Nov 2, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 2, 2024

Webrevs

@eme64
Copy link
Contributor

eme64 commented Nov 7, 2024

Hi @archiecobbs can you please give some more info about why these were introduced, and why they are now not needed any more?

@archiecobbs
Copy link
Contributor Author

Hi @eme64,

Hi @archiecobbs can you please give some more info about why these were introduced, and why they are now not needed any more?

FYI there are several other PR's like this one. I haven't checked exhaustively, but all of the ones I've checked appear to be due to either (a) the warning was never needed, or (b) a subsequent refinement of the warning itself which made the code no longer qualify as "warnable".

For an example of (a) see commit 8fb70c7 which added @SuppressWarnings("unchecked") for a cast to type Key, even though Key is not a generic type and so the cast was never unchecked in the first place.

For an example of (b), see commit b431c69 which added @SuppressWarnings("serial") because an anonymous class did not declare serialVersionUID, but then later the warning was was changed to no longer trigger in that situation by JDK-7152104, but the annotation was not removed as part of that commit.

In this particular PR, it looks like (for example) the useless @SuppressWarnings("try") annotations on compileMethod() was added in this commit - probably a copy & paste error. This is typical.

I guess the only other possibility is that the warning stopped working at some point due to a bug, but I haven't seen any examples of that.

@archiecobbs
Copy link
Contributor Author

but all of the ones I've checked appear to be ...

Correction - there is actually one case that revealed a compiler bug: JDK-8343286.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 19, 2024
Copy link
Contributor

@eme64 eme64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for the explanation. Sounds reasonable.

@archiecobbs
Copy link
Contributor Author

Thanks for the reviews.

@archiecobbs
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Nov 19, 2024

Going to push as commit 087a07b.
Since your change was applied there have been 146 commits pushed to the master branch:

  • 02ec8ca: 8342508: Use latch in BasicMenuUI/bug4983388.java instead of delay
  • 47ebf8d: 8342098: Write a test to compare the images
  • 78602be: 8344024: Unnecessary Hashtable usage in RSAPSSSignature.DIGEST_LENGTHS
  • 7f672eb: 8344550: Compilation error of jpackage test JPackageStringBundle.java source
  • 48223f7: 8344143: Test jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java timed out on macosx-x64
  • d4cd27e: 8344445: MethodCounters don't need a vptr
  • dc940ec: 8344387: RISC-V: C2: Improve encoding of LoadNKlass for compact headers
  • ded01e4: 8344327: SM cleanup in jdk.unsupported ReflectionFactory
  • 59fcfae: 8343129: Disable unstable check of ThreadsListHandle.sanity_vm ThreadList values
  • 1717946: 8344302: G1: Refactor G1CMTask::do_marking_step to use smaller wrapper methods
  • ... and 136 more: https://git.openjdk.org/jdk/compare/c00e20c399cf9b3b21258bd5654a92d703c8fcd2...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 19, 2024
@openjdk openjdk bot closed this Nov 19, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 19, 2024
@openjdk
Copy link

openjdk bot commented Nov 19, 2024

@archiecobbs Pushed as commit 087a07b.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

graal graal-dev@openjdk.org hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants