-
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
Make Server::setDefaultHandler and Server::setErrorHandler arguments consistent #12802
Comments
@scrat98 I'm not sure it's a good idea to have a single handler that performs both error handling and also last resort handling of a request. I think it makes your code more monolithic and less flexible, but, ymmv. As a |
@janbartel I'm using different instances (have But to avoid warn log, only single |
I think we will have to leave the published method signatures as they are - definitely at least for 12.0 - but maybe in |
Jetty version(s)
12.0.16
Enhancement Description
There is an inconsistency in arguments between
Server::setDefaultHandler
andServer::setErrorHandler
.Server::setDefaultHandler
acceptsorg.eclipse.jetty.server.Handler
Server::setErrorHandler
acceptsorg.eclipse.jetty.server.Request.Handler
I would like to use in Application code only
org.eclipse.jetty.server.Handler
and if I do so and use it withServer::setErrorHandler
then I'll get a warningWARN o.e.jetty.server.Handler$Abstract - No Server set for csclhs.UnhandledErrorsHandler@5ace1ed4{STARTING}
and due to this I need to implement my hanlder as aorg.eclipse.jetty.server.Request.Handler
to suppress this warning.Nothing serious, but I think it should be easy to change.
The text was updated successfully, but these errors were encountered: