Integrated: 8289616: Drop use of Thread.stop in AppContext
Phil Race
prr at openjdk.org
Tue Aug 16 22:57:16 UTC 2022
On Fri, 12 Aug 2022 20:14:27 GMT, Phil Race <prr at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 01b87ba8
Author: Phil Race <prr at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/01b87ba8e2c48ad29c1f4771973ebbe938967448
Stats: 118 lines in 2 files changed: 7 ins; 111 del; 0 mod
8289616: Drop use of Thread.stop in AppContext
Reviewed-by: alanb, iris, azvegint
-------------
PR: https://git.openjdk.org/jdk/pull/9863
More information about the client-libs-dev
mailing list