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. ------------- Commit messages: - 8289616 Changes: https://git.openjdk.org/jdk/pull/9863/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9863&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8289616 Stats: 118 lines in 2 files changed: 7 ins; 111 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/9863.diff Fetch: git fetch https://git.openjdk.org/jdk pull/9863/head:pull/9863 PR: https://git.openjdk.org/jdk/pull/9863
