jdk
jdk copied to clipboard
8289616: Drop use of Thread.stop in AppContext
Thread.stop() and ThreadGroup.destroy() are called by sun.awt.AppContext.dispose()
These should no longer be called. Both are deprecated for removal. ThreadGroup.destroy() does nothing. Thread.stop() throws UnsupportedOperationException for virtual threads, and is expected to do so for all threads if it is not removed before then.
This fix stops calling these methods and prints a warning from dispose() to encourage callers to move away from AppContext which itself will likely be removed in a future release since the Webstart and Plugin scenarios that needed it are no longer supported. Although most tests that use AppContext are now irrelevant only one test actually fails and is removed so we are doing the least here and the big job of completely getting rid of AppContext is for another day.
Progress
- [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8289616: Drop use of Thread.stop in AppContext
Reviewers
- Alan Bateman (@AlanBateman - Reviewer)
- Iris Clark (@irisclark - Reviewer)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9863/head:pull/9863
$ git checkout pull/9863
Update a local copy of the PR:
$ git checkout pull/9863
$ git pull https://git.openjdk.org/jdk pull/9863/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9863
View PR using the GUI difftool:
$ git pr show -t 9863
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9863.diff
:wave: Welcome back prr! 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.
@prrace The following label will be automatically applied to this pull request:
client
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.
@prrace 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:
8289616: Drop use of Thread.stop in AppContext
Reviewed-by: alanb, iris, azvegint
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 34 new commits pushed to the master branch:
- c3d3662e52de434adb267485982fbf8541bdc0c8: 8292313: 2 runtime/cds/appcds tests fail after JDK-8284313
- 3e122419b2979235f57c0dd549ca63647ea73753: 8290775: Some doc errors in DerOutputStream.java
- ec53fba03933446024028555b87c6023895a5dc6: 8292361: Build failure on PPC64 BE after JDK-8290840
- 4cc6cb9d9ddbcc540baac7b81398f2af83f93340: 8290041: ModuleDescriptor.hashCode is inconsistent
- d1edda8ff52e172a85d102d7d5062b9cc401beea: 8292338: aarch64: Use cbnz instruction in gen_continuation_enter when possible
- 21f4eb2233a95be44a5db59b7791cd952ddbd56e: 6521141: DebugGraphics NPE @ setFont();
- 6e6ae596d6bd73909b90911e01fbd0c16f6335e1: 8292286: Convert PlaceholderTable to ResourceHashtable
- ea2c82e74f5580f396920f9e561cbec80c03f373: 8291949: Unexpected extending of SupportedGroups
- b5707b0376660cd8763e46d525ba614b08a59d7b: 8292196: Reduce runtime of java.util.regex microbenchmarks
- b00eedeb029445417f99e8aa4e8fca12e5c69155: 8291511: Redefinition of EXIT_FAILURE in libw2k_lsa_auth
- ... and 24 more: https://git.openjdk.org/jdk/compare/755ecf6b7384e67ccb51c4498f94336631db690d...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.
/integrate
Going to push as commit 01b87ba8e2c48ad29c1f4771973ebbe938967448.
Since your change was applied there have been 35 commits pushed to the master branch:
- e44e3f0c1976a513c6637545f49f49de84cbac02: 8289106: Add model of class file versions to core reflection
- c3d3662e52de434adb267485982fbf8541bdc0c8: 8292313: 2 runtime/cds/appcds tests fail after JDK-8284313
- 3e122419b2979235f57c0dd549ca63647ea73753: 8290775: Some doc errors in DerOutputStream.java
- ec53fba03933446024028555b87c6023895a5dc6: 8292361: Build failure on PPC64 BE after JDK-8290840
- 4cc6cb9d9ddbcc540baac7b81398f2af83f93340: 8290041: ModuleDescriptor.hashCode is inconsistent
- d1edda8ff52e172a85d102d7d5062b9cc401beea: 8292338: aarch64: Use cbnz instruction in gen_continuation_enter when possible
- 21f4eb2233a95be44a5db59b7791cd952ddbd56e: 6521141: DebugGraphics NPE @ setFont();
- 6e6ae596d6bd73909b90911e01fbd0c16f6335e1: 8292286: Convert PlaceholderTable to ResourceHashtable
- ea2c82e74f5580f396920f9e561cbec80c03f373: 8291949: Unexpected extending of SupportedGroups
- b5707b0376660cd8763e46d525ba614b08a59d7b: 8292196: Reduce runtime of java.util.regex microbenchmarks
- ... and 25 more: https://git.openjdk.org/jdk/compare/755ecf6b7384e67ccb51c4498f94336631db690d...master
Your commit was automatically rebased without conflicts.
@prrace Pushed as commit 01b87ba8e2c48ad29c1f4771973ebbe938967448.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.