-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8371748: Remove the (empty) ThreadPoolExecutor.finalize() method #28311
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
base: master
Are you sure you want to change the base?
Conversation
|
/csr |
|
👋 Welcome back bchristi! A progress list of the required criteria for merging this PR into |
|
@bchristi-git This change is no longer ready for integration - check the PR body for details. |
|
@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. |
viktorklang-ora
left a comment
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.
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 any 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. |
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