diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java index 25841db287c..768bf108fd2 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/HttpChannel.java @@ -494,15 +494,19 @@ public abstract class HttpChannel implements Runnable, HttpOutput.Interceptor if (!_request.hasMetaData()) throw new IllegalStateException("state=" + _state); - dispatch(DispatcherType.REQUEST, () -> + dispatch(DispatcherType.REQUEST, new Dispatchable() { - for (HttpConfiguration.Customizer customizer : _configuration.getCustomizers()) + @Override + public void dispatch() throws IOException, ServletException { - customizer.customize(getConnector(), _configuration, _request); - if (_request.isHandled()) - return; + for (HttpConfiguration.Customizer customizer : _configuration.getCustomizers()) + { + customizer.customize(getConnector(), _configuration, _request); + if (_request.isHandled()) + return; + } + getServer().handle(HttpChannel.this); } - getServer().handle(HttpChannel.this); }); break; diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/AdaptiveExecutionStrategy.java b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/AdaptiveExecutionStrategy.java index cae0e352d07..6c163c2617d 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/AdaptiveExecutionStrategy.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/thread/strategy/AdaptiveExecutionStrategy.java @@ -137,7 +137,14 @@ public class AdaptiveExecutionStrategy extends ContainerLifeCycle implements Exe private final Executor _executor; private final TryExecutor _tryExecutor; private final Executor _virtualExecutor; - private final Runnable _runPendingProducer = () -> tryProduce(true); + private final Runnable _runPendingProducer = new Runnable() + { + @Override + public void run() + { + tryProduce(true); + } + }; private State _state = State.IDLE; private boolean _pending;