Skip to content

Commit

Permalink
Using the more generic org.eclipse.jetty.server.Handler in place of t…
Browse files Browse the repository at this point in the history
…he more specific org.eclipse.jetty.server.handler.ContextHandler implementation. According to the [Migration Guide](https://jetty.org/docs/jetty/12/programming-guide/migration/11-to-12.html#api-changes-handler-sequence), Handler.Sequence replaced HandlerCollection and HandlerList. ContextHandlerCollection is retained for its efficient child ContextHandler selection. Unless performance considerations or the need for a more restrictive implementation justify it, a more generic implementation reduces code complexity and provides greater functional possibilities for plugins.
  • Loading branch information
“Huy committed Nov 18, 2024
1 parent e032592 commit ecb0278
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.server.*;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.Handler.Sequence;
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.eclipse.jetty.ee8.servlet.ServletContextHandler;
Expand Down Expand Up @@ -312,7 +311,7 @@ public final class HttpBindManager implements CertificateEventListener {
*
* This collection is mutable. Handlers can be added and removed at runtime.
*/
private final ContextHandlerCollection extensionHandlers = new ContextHandlerCollection(true);
private final Sequence extensionHandlers = new Sequence();

/**
* A task that, periodically, updates the 'last modified' date of all files in the Jetty 'tmp' directories. This
Expand Down

0 comments on commit ecb0278

Please sign in to comment.