Skip to content

Commit a02fd7c

Browse files
committed
RequestMappingHandlerAdapter properly invokes handler method in case of no session as well
Issue: SPR-13999
1 parent 9c0f99c commit a02fd7c

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
@@ -725,7 +725,7 @@ protected boolean supportsInternal(HandlerMethod handlerMethod) {
725725
protected ModelAndView handleInternal(HttpServletRequest request,
726726
HttpServletResponse response, HandlerMethod handlerMethod) throws Exception {
727727

728-
ModelAndView mav = null;
728+
ModelAndView mav;
729729
checkRequest(request);
730730

731731
// Execute invokeHandlerMethod in synchronized block if required.
@@ -737,8 +737,13 @@ protected ModelAndView handleInternal(HttpServletRequest request,
737737
mav = invokeHandlerMethod(request, response, handlerMethod);
738738
}
739739
}
740+
else {
741+
// No HttpSession available -> no mutex necessary
742+
mav = invokeHandlerMethod(request, response, handlerMethod);
743+
}
740744
}
741745
else {
746+
// No synchronization on session demanded at all...
742747
mav = invokeHandlerMethod(request, response, handlerMethod);
743748
}
744749

0 commit comments

Comments
 (0)