8371748: Remove the (empty) ThreadPoolExecutor.finalize() method#28311
8371748: Remove the (empty) ThreadPoolExecutor.finalize() method#28311bchristi-git wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
/csr |
|
👋 Welcome back bchristi! A progress list of the required criteria for merging this PR into |
|
@bchristi-git 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 238 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 |
|
@bchristi-git an approved CSR request is already required for this pull request. |
|
@bchristi-git 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 /label pull request command. |
Webrevs
|
viktorklang-ora
left a comment
There was a problem hiding this comment.
Thanks @bchristi-git!
|
The failures in the GitHub actions job appear related: |
Indeed. |
|
Thank you, reviewers. :) |
It might make more sense for this PR to remove testFinalizeMethodCallsSuperFinalize as it's part of the removal. |
Should I close #28278 as duplicated to this PR. |
|
Wrt. the CSR’s “Compatibility Risk Description”:
This isn’t completely correct, as
|
Indeed, there is a source compatibility issue here. @bchristi-git Have you done corpus searches yet to see if there are cases that extend TPE and invoke super.finalize? It wouldn't be in code written in recent years, but maybe older code that needs updating. The overall risk here is low though and the migration would be to just drop the super.finalize() as it doesn't do anything since JDK 11. |
|
@bchristi-git I have integrated #28278, I think you should merge the master to fix the GHA test failures. |
My Corpus searches found quite a few TPE subclasses, but none of them override finalize or invoke finalize. |
|
I've created a Release Note for this change, if someone could have a look and review it: |
|
Hello Brent, the release note looks good to me. Just a minor suggestion, perhaps the following:
could be replaced with
|
|
Thanks, Jai - RN updated. |
|
/integrate |
|
Going to push as commit f3dd8da.
Your commit was automatically rebased without conflicts. |
|
@bchristi-git Pushed as commit f3dd8da. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
From the bug report:
Prior to JDK 11, ThreadPoolExecutor.finalize() was specified to
"[invoke] shutdown() when this executor is no longer referenced and it has no threads."
In JDK 11, ThreadPoolExecutor.finalize() was re-specified to do nothing, leaving the finalize() method empty. (JDK-8190324).
In JDK 18, finalize() was deprecated for removal (JDK-8276447), after first being "standard" deprecated in JDK 9 (JDK-8165641).
The finalize() method can safely be removed from ThreadPoolExecutor.
Progress
Issues
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/28311/head:pull/28311$ git checkout pull/28311Update a local copy of the PR:
$ git checkout pull/28311$ git pull https://git.openjdk.org/jdk.git pull/28311/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 28311View PR using the GUI difftool:
$ git pr show -t 28311Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/28311.diff
Using Webrev
Link to Webrev Comment