From a00f491ff55ff3b779994878a44313e8c39f8956 Mon Sep 17 00:00:00 2001 From: Jan Supol Date: Fri, 25 Oct 2019 14:38:16 +0200 Subject: [PATCH] Make JettyConnectorThreadPool#newThread public to comply with Jetty 9.4.22.v20191022 Signed-off-by: Jan Supol --- .../glassfish/jersey/jetty/JettyHttpContainerFactory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java index b501079b0d..b0f7663aa2 100644 --- a/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java +++ b/containers/jetty-http/src/main/java/org/glassfish/jersey/jetty/JettyHttpContainerFactory.java @@ -286,6 +286,10 @@ public static Server createServer(final URI uri, return server; } + // TODO: Use https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/util/thread/QueuedThreadPool.html + // #%3Cinit%3E(int,int,int,int,java.util.concurrent.BlockingQueue,java.lang.ThreadGroup,java.util.concurrent.ThreadFactory) + // + // Keeping this for backwards compatibility for the time being private static final class JettyConnectorThreadPool extends QueuedThreadPool { private final ThreadFactory threadFactory = new ThreadFactoryBuilder() .setNameFormat("jetty-http-server-%d") @@ -293,7 +297,7 @@ private static final class JettyConnectorThreadPool extends QueuedThreadPool { .build(); @Override - protected Thread newThread(Runnable runnable) { + public Thread newThread(Runnable runnable) { return threadFactory.newThread(runnable); } }