Skip to content

Commit 8a44560

Browse files
committed
RequestMappingHandlerAdapter properly invokes handler method in case of no session as well
Issue: SPR-13999 (cherry picked from commit a02fd7c)
1 parent 0349abc commit 8a44560

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ protected boolean supportsInternal(HandlerMethod handlerMethod) {
721721
protected ModelAndView handleInternal(HttpServletRequest request,
722722
HttpServletResponse response, HandlerMethod handlerMethod) throws Exception {
723723

724-
ModelAndView mav = null;
724+
ModelAndView mav;
725725
checkRequest(request);
726726

727727
// Execute invokeHandlerMethod in synchronized block if required.
@@ -733,8 +733,13 @@ protected ModelAndView handleInternal(HttpServletRequest request,
733733
mav = invokeHandlerMethod(request, response, handlerMethod);
734734
}
735735
}
736+
else {
737+
// No HttpSession available -> no mutex necessary
738+
mav = invokeHandlerMethod(request, response, handlerMethod);
739+
}
736740
}
737741
else {
742+
// No synchronization on session demanded at all...
738743
mav = invokeHandlerMethod(request, response, handlerMethod);
739744
}
740745

0 commit comments

Comments
 (0)