8294695: Remove redundant deprecation suppression in ThreadGroup

Reviewed-by: alanb, jpai
This commit is contained in:
Andrey Turbanov 2022-10-03 16:03:31 +00:00
parent 46633e644a
commit edfb18a724

View file

@ -375,7 +375,6 @@ public class ThreadGroup implements Thread.UncaughtExceptionHandler {
public int activeCount() { public int activeCount() {
int n = 0; int n = 0;
for (Thread thread : Thread.getAllThreads()) { for (Thread thread : Thread.getAllThreads()) {
@SuppressWarnings("deprecation")
ThreadGroup g = thread.getThreadGroup(); ThreadGroup g = thread.getThreadGroup();
if (parentOf(g)) { if (parentOf(g)) {
n++; n++;
@ -446,7 +445,6 @@ public class ThreadGroup implements Thread.UncaughtExceptionHandler {
int n = 0; int n = 0;
if (list.length > 0) { if (list.length > 0) {
for (Thread thread : Thread.getAllThreads()) { for (Thread thread : Thread.getAllThreads()) {
@SuppressWarnings("deprecation")
ThreadGroup g = thread.getThreadGroup(); ThreadGroup g = thread.getThreadGroup();
if (g == this || (recurse && parentOf(g))) { if (g == this || (recurse && parentOf(g))) {
list[n++] = thread; list[n++] = thread;
@ -582,7 +580,6 @@ public class ThreadGroup implements Thread.UncaughtExceptionHandler {
public final void interrupt() { public final void interrupt() {
checkAccess(); checkAccess();
for (Thread thread : Thread.getAllThreads()) { for (Thread thread : Thread.getAllThreads()) {
@SuppressWarnings("deprecation")
ThreadGroup g = thread.getThreadGroup(); ThreadGroup g = thread.getThreadGroup();
if (parentOf(g)) { if (parentOf(g)) {
thread.interrupt(); thread.interrupt();