Closed kriegaex closed 7 months ago
@slawekjaranowski, this is ready for review.
Thanks.
I think we also should deprecate options stopUnresponsiveDaemonThreads
of exec:java
I think we also should deprecate options
stopUnresponsiveDaemonThreads
ofexec:java
Despite Thread::stop
being deprecated for a long time, it still works in JDK 17 LTS, which is just 2 years old, up to JDK 19 (1 year old). Given the fact that the plugin still is built with target 8, JDK 8 LTS being 9 years old, I guess that there might still be Java 17 users for many years to come. I just fixed the build for JDK 21 today. So, of course you can deprecate the option, but probably it will stick around for quite a while.
In JDK 20+, the long deprecated
Thread.stop()
(since JDK 1.2) has been removed and will throw anUnsupportedOperationException
. This will be handled gracefully when using optionstopUnresponsiveDaemonThreads
, yielding a log warning "Thread.stop() is unavailable in this JRE version, cannot force-stop any threads" once and not trying to stop any further threads during the same execution.Tests and documentation have been adjusted accordingly.
Closes #391.