-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add constructors accepting the handler to wrap to all core handler wrappers #9988
Conversation
Seems reasonable. |
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/DebugHandler.java
Show resolved
Hide resolved
jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ShutdownHandler.java
Outdated
Show resolved
Hide resolved
I have a little bit of a doubt after the very long history of (at least some) handler constructors taking the parent handler as the argument, whereas this flips it around and passes the child. But I do think it looks neat. Maybe we solve that with very good documentation. |
@janbartel this PR is a followup to #9948 that changed all handlers to only take the child handler as an argument as it was decided in #9946. Said differently, passing the child handler to the constructor of a |
@lorban hhhmm'ok. So you're saying that if I look in the documentation I'll find this difference with foregoing versions of jetty clearly spelt out? :) |
@janbartel now you should :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm +1 on this once it actually compiles.
…appers Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
Signed-off-by: Ludovic Orban <[email protected]>
2aed6ab
to
ae45c23
Compare
Add constructors that accept the wrapped handler to all core
Handler.Wrapper
subclassesThis allows the chaining of hander wrappers in a more elegant way; this is how we currently do it:
and this is what this change allows us to write: