Skip to content

Conversation

@sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Nov 13, 2025

Hi all,

In JDK 11, ThreadPoolExecutor.finalize() was specified to do nothing, leaving the finalize() method empty by JDK-8371748, so I think it's safety to remove finalize() in testFinalizeMethodCallsSuperFinalize for test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java.

This PR also remove unnecessary '@SuppressWarnings("removal")' in test/jdk/java/util/concurrent/tck/JSR166TestCase.java and test/jdk/java/util/concurrent/tck/ExecutorsTest.java.

Change has been verified locally on linux-x64 by run test java/util/concurrent/tck/JSR166TestCase.java#default. Test-fix only, no risk,


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-8371682: Suppress javac warning from ThreadPoolExecutorSubclassTest.java (Bug - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28278

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 13, 2025

👋 Welcome back syan! 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 13, 2025

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

8371682: Suppress javac warning from ThreadPoolExecutorSubclassTest.java

Reviewed-by: jpai

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

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 core-libs core-libs-dev@openjdk.org label Nov 13, 2025
@openjdk
Copy link

openjdk bot commented Nov 13, 2025

@sendaoYan The following label will be automatically applied to this pull request:

  • core-libs

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.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 13, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 13, 2025

Webrevs

@AlanBateman
Copy link
Contributor

I think the changes in this PR are okay. I think it is time to remove TPE.finalize too (not this PR of course).

@SirYwell
Copy link
Member

What does testFinalizeMethodCallsSuperFinalize test now?

@sendaoYan
Copy link
Member Author

sendaoYan commented Nov 13, 2025

What does testFinalizeMethodCallsSuperFinalize test now?

I have verified java/util/concurrent/tck/JSR166TestCase.java#default locally, test still run passed. Test java/util/concurrent/tck/JSR166TestCase.java#default will invoke all the junit tests in java/util/concurrent/tck directory.

@bchristi-git
Copy link
Member

I think it is time to remove TPE.finalize too

FYI, I've submitted a PR to do this:
https://git.openjdk.org/jdk/pull/28311

@jaikiran
Copy link
Member

The changes look good to me but I think Hannes' question is valid.

What does testFinalizeMethodCallsSuperFinalize test now?

I have verified java/util/concurrent/tck/JSR166TestCase.java#default locally, test still run passed. Test java/util/concurrent/tck/JSR166TestCase.java#default will invoke all the junit tests in java/util/concurrent/tck directory.

Is the testFinalizeMethodCallsSuperFinalize() needed or can it be removed? With the changes in this PR, I don't see what this method tests, especially given its name. It's a different matter that even without the changes to this PR, I am not sure what was being tested/asserted in that test method.

@sendaoYan
Copy link
Member Author

The changes look good to me but I think Hannes' question is valid.

What does testFinalizeMethodCallsSuperFinalize test now?

I have verified java/util/concurrent/tck/JSR166TestCase.java#default locally, test still run passed. Test java/util/concurrent/tck/JSR166TestCase.java#default will invoke all the junit tests in java/util/concurrent/tck directory.

Is the testFinalizeMethodCallsSuperFinalize() needed or can it be removed? With the changes in this PR, I don't see what this method tests, especially given its name. It's a different matter that even without the changes to this PR, I am not sure what was being tested/asserted in that test method.

Sorry, I get the questions now.

Test testFinalizeMethodCallsSuperFinalize was added by JDK-8190324. Since #28278 will remove the (empty) ThreadPoolExecutor.finalize() method, so testFinalizeMethodCallsSuperFinalize can be removed also.

Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

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

The change looks good to me. I'll let you decide with others on the other PR #28311 whether the testFinalizeMethodCallsSuperFinalize test method removal should be part of this PR or the other one.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 17, 2025
@sendaoYan
Copy link
Member Author

sendaoYan commented Nov 17, 2025

Besides remove the testFinalizeMethodCallsSuperFinalize, this PR also remove two unnecessary '@SuppressWarnings("removal")'. So I think it's suitable integrate this PR standalone before #28311.

Thanks all for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Nov 17, 2025

Going to push as commit 44087ea.
Since your change was applied there have been 63 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 17, 2025

@sendaoYan Pushed as commit 44087ea.

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

@sendaoYan sendaoYan deleted the jbs8371682 branch November 17, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

5 participants