From 155a1c6c71c9ea06b58c2be49d6e3ed4db51c700 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 26 Jun 2017 18:58:39 +0200 Subject: [PATCH] AsyncHandlerInterceptor.afterConcurrentHandlingStarted declared as default method Issue: SPR-15702 --- .../web/servlet/AsyncHandlerInterceptor.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/AsyncHandlerInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/AsyncHandlerInterceptor.java index 22abd51f964..802c693d376 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/AsyncHandlerInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/AsyncHandlerInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,8 +60,8 @@ import org.springframework.web.method.HandlerMethod; public interface AsyncHandlerInterceptor extends HandlerInterceptor { /** - * Called instead of {@code postHandle} and {@code afterCompletion}, when - * the a handler is being executed concurrently. + * Called instead of {@code postHandle} and {@code afterCompletion} + * when the handler is being executed concurrently. *

Implementations may use the provided request and response but should * avoid modifying them in ways that would conflict with the concurrent * execution of the handler. A typical use of this method would be to @@ -72,7 +72,9 @@ public interface AsyncHandlerInterceptor extends HandlerInterceptor { * execution, for type and/or instance examination * @throws Exception in case of errors */ - void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, Object handler) - throws Exception; + default void afterConcurrentHandlingStarted( + HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { + } }