Skip to content
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

AsyncHandlerInterceptor doesn't have a default method [SPR-15702] #20259

spring-projects-issues opened this issue Jun 25, 2017 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Jun 25, 2017

Marten Deinum opened SPR-15702 and commented

Looking at the HandlerInterceptor that has all methods implemented as default methods. However the AsyncHandlerInterceptor method isn't defined as a default method. Would be nice if this could be done as well.

Shouldn't this also deprecate the HandlerInterceptorAdapter as was done with the WebMvcConfigurerAdapter?

Affects: 5.0 RC2

Referenced from: commits 155a1c6

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Jun 26, 2017

Juergen Hoeller commented

Good point, AsyncHandlerInterceptor can easily be based on default methods as well.

As for HandlerInterceptorAdapter, we're extending that class ourselves quite a bit and are not really keen to drag deprecation into those subclasses. Also, technically there's a small performance advantage in direct dispatching on a class versus default method dispatching at the JVM level, so it doesn't hurt to keep it around. Overall, we have an easier time deprecating adapter classes with less framework-internal impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants