RFR(s): 8204243: remove Thread.destroy() and Thread.stop(Throwable)
David Holmes
david.holmes at oracle.com
Fri Jun 1 23:40:56 UTC 2018
Hi Stuart!
Nooooooo!
Just kidding!
Yaaaaaay!!!!
Actual removal looks fine but what about the corresponding JDI code:
./jdk.jdi/share/classes/com/sun/jdi/ThreadReference.java
it still has a stop(Throwable) function (it doesn't have the no-arg
one!). What happens to it? The JDI functions were never deprecated in
line with the Thread functions (suspend/resume/stop).
The ThreadReference javadoc has:
* @see java.lang.Thread#stop(Throwable)
so will need fixing.
Thanks,
David
On 2/06/2018 7:16 AM, Stuart Marks wrote:
> Hi all,
>
> Please review this changeset to remove the Thread.destroy() and
> Thread.stop(Throwable) methods. Both of these methods have been
> deprecated for a long time, and they were deprecated for removal in Java
> SE 9.
>
> Thread.destroy() was never implemented, and has always thrown
> NoSuchMethodError back to the caller. Thread.stop(Throwable) was made
> non-functional in JDK 8, throwing UnsupportedOperationException back to
> the caller.
>
> Note that the no-arg Thread.stop() method remains deprecated, not for
> removal, and is unaffected by this changeset.
>
> Note also that ThreadGroup.destroy() doesn't actually destroy any
> threads -- just thread groups -- and that it is also unaffected by this
> changeset.
>
> Bug:
>
> https://bugs.openjdk.java.net/browse/JDK-8204243
>
> Webrev:
>
> http://cr.openjdk.java.net/~smarks/reviews/8204243/webrev.0/
>
> Thanks,
>
> s'marks
> aka @DrDeprecator
More information about the core-libs-dev
mailing list