--- old/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2018-02-10 09:14:21.208104146 -0800 +++ new/src/java.base/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2018-02-10 09:14:21.004102355 -0800 @@ -35,9 +35,6 @@ package java.util.concurrent; -import java.security.AccessControlContext; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.util.ArrayList; import java.util.ConcurrentModificationException; import java.util.HashSet; @@ -268,8 +265,8 @@ * *
A pool that is no longer referenced in a program AND * has no remaining threads may be reclaimed (garbage collected) - * without being explicity shutdown. You can configure a pool to allow - * all unused threads to eventually die by setting appropriate + * without being explicitly shutdown. You can configure a pool to + * allow all unused threads to eventually die by setting appropriate * keep-alive times, using a lower bound of zero core threads and/or * setting {@link #allowCoreThreadTimeOut(boolean)}.
* @@ -1462,6 +1459,18 @@ } } + // Override without "throws Throwable" for compatibility with subclasses + // whose finalize method invokes super.finalize() (as is recommended). + // Before JDK 11, finalize() had a non-empty method body. + + /** + * @implNote Previous versions of this class had a finalize method + * that shut down this executor, but in this version, finalize + * does nothing. + */ + @Deprecated(since="9") + protected void finalize() {} + /** * Sets the thread factory used to create new threads. *