From 374c8ef8c5efc27a4a3da83da48882c265d1126a Mon Sep 17 00:00:00 2001 From: SendaoYan Date: Thu, 13 Nov 2025 10:25:39 +0800 Subject: [PATCH 1/2] 8371682: Suppress javac warning from ThreadPoolExecutorSubclassTest.java --- test/jdk/java/util/concurrent/tck/ExecutorsTest.java | 1 - test/jdk/java/util/concurrent/tck/JSR166TestCase.java | 1 - .../concurrent/tck/ThreadPoolExecutorSubclassTest.java | 9 --------- 3 files changed, 11 deletions(-) diff --git a/test/jdk/java/util/concurrent/tck/ExecutorsTest.java b/test/jdk/java/util/concurrent/tck/ExecutorsTest.java index b4b4324ae5c5a..91dfd3cce1c0f 100644 --- a/test/jdk/java/util/concurrent/tck/ExecutorsTest.java +++ b/test/jdk/java/util/concurrent/tck/ExecutorsTest.java @@ -329,7 +329,6 @@ public void realRun() { * ThreadPoolExecutor using defaultThreadFactory has * specified group, priority, daemon status, and name */ - @SuppressWarnings("removal") public void testDefaultThreadFactory() throws Exception { final ThreadGroup egroup = Thread.currentThread().getThreadGroup(); final CountDownLatch done = new CountDownLatch(1); diff --git a/test/jdk/java/util/concurrent/tck/JSR166TestCase.java b/test/jdk/java/util/concurrent/tck/JSR166TestCase.java index 80e6c98bfa7bf..f1f32bee31092 100644 --- a/test/jdk/java/util/concurrent/tck/JSR166TestCase.java +++ b/test/jdk/java/util/concurrent/tck/JSR166TestCase.java @@ -1169,7 +1169,6 @@ static boolean threadOfInterest(ThreadInfo info) { * A debugging tool to print stack traces of most threads, as jstack does. * Uninteresting threads are filtered out. */ - @SuppressWarnings("removal") static void dumpTestThreads() { System.err.println("------ stacktrace dump start ------"); for (ThreadInfo info : THREAD_MXBEAN.dumpAllThreads(true, true)) diff --git a/test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java b/test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java index dec00360f602a..80d19300afbb1 100644 --- a/test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java +++ b/test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java @@ -1997,19 +1997,10 @@ public void testGet_cancelled() throws Exception { } } } - @SuppressWarnings("deprecation") public void testFinalizeMethodCallsSuperFinalize() { new CustomTPE(1, 1, LONG_DELAY_MS, MILLISECONDS, new LinkedBlockingQueue()) { - - /** - * A finalize method without "throws Throwable", that - * calls super.finalize(). - */ - protected void finalize() { - super.finalize(); - } }.shutdown(); } From 3c57f3bc784c8ee7ba4cc0021e693aaaa3f85045 Mon Sep 17 00:00:00 2001 From: SendaoYan Date: Mon, 17 Nov 2025 12:34:12 +0800 Subject: [PATCH 2/2] Remove testFinalizeMethodCallsSuperFinalize --- .../util/concurrent/tck/ThreadPoolExecutorSubclassTest.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java b/test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java index 80d19300afbb1..5f117fd5e8577 100644 --- a/test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java +++ b/test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java @@ -1997,11 +1997,5 @@ public void testGet_cancelled() throws Exception { } } } - public void testFinalizeMethodCallsSuperFinalize() { - new CustomTPE(1, 1, - LONG_DELAY_MS, MILLISECONDS, - new LinkedBlockingQueue()) { - }.shutdown(); - } }