Redundant @SuppressWarnings("deprecation") for Thread.getThreadGroup()
Alan Bateman
Alan.Bateman at oracle.com
Wed Sep 28 07:17:42 UTC 2022
On 28/09/2022 07:58, Andrey Turbanov wrote:
> Hello.
> IntelliJ IDEA highlights redundant warning suppressions for
> Thread.getThreadGroup() calls in ThreadGroup calls.
> All of them were added during Loom integration.
>
> https://github.com/openjdk/jdk/blob/79ccc791f275be7cfea95ff0ce8cf7361c7f08ad/src/java.base/share/classes/java/lang/ThreadGroup.java#L378
> https://github.com/openjdk/jdk/blob/79ccc791f275be7cfea95ff0ce8cf7361c7f08ad/src/java.base/share/classes/java/lang/ThreadGroup.java#L449
> https://github.com/openjdk/jdk/blob/79ccc791f275be7cfea95ff0ce8cf7361c7f08ad/src/java.base/share/classes/java/lang/ThreadGroup.java#L585
>
> Is it still planned to deprecate this method? Or can I remove
> redundant suppressions?
>
At some point yes, but it may be too disruptive in the short term. I
think these SW are left over from one of the iterations where it was
deprecated. It's okay to remove them.
-Alan
More information about the core-libs-dev
mailing list