< prev index next >

test/jdk/java/util/concurrent/tck/ThreadPoolExecutorSubclassTest.java

Print this page
8190324: ThreadPoolExecutor should not specify a dependency on finalization
Reviewed-by: martin, psandoz, alanb, rriggs, dholmes

@@ -1992,6 +1992,21 @@
                 assertTrue(future.isDone());
             }
         }
     }
 
+    public void testFinalizeMethodCallsSuperFinalize() {
+        new CustomTPE(1, 1,
+                      LONG_DELAY_MS, MILLISECONDS,
+                      new LinkedBlockingQueue<Runnable>()) {
+
+            /**
+             * A finalize method without "throws Throwable", that
+             * calls super.finalize().
+             */
+            protected void finalize() {
+                super.finalize();
+            }
+        }.shutdown();
+    }
+
 }
< prev index next >