diff --git a/src/share/classes/sun/nio/ch/ThreadPool.java b/src/share/classes/sun/nio/ch/ThreadPool.java index 4efcfd5304e085ae0106b19ec2cbdd7aa031f848..6a2fe42c747286ecb6ae361d63609ad785d391af 100644 --- a/src/share/classes/sun/nio/ch/ThreadPool.java +++ b/src/share/classes/sun/nio/ch/ThreadPool.java @@ -102,11 +102,7 @@ public class ThreadPool { if (threadFactory == null) threadFactory = defaultThreadFactory; // create thread pool - ExecutorService executor = - new ThreadPoolExecutor(0, Integer.MAX_VALUE, - Long.MAX_VALUE, TimeUnit.MILLISECONDS, - new SynchronousQueue(), - threadFactory); + ExecutorService executor = Executors.newCachedThreadPool(threadFactory); return new ThreadPool(executor, false, initialSize); }