Define behavior of null Callable or DeferredResult

When a controller method declares Callable or DeferredResult as its
return value, and returns null, async processing will not start and
the request will be considered "handled" by the controller method.

Issue: SPR-9951
This commit is contained in:
Rossen Stoyanchev 2012-11-20 15:12:58 -05:00
parent 77223d7ced
commit 11cf978394
3 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,7 @@ public class AsyncTaskMethodReturnValueHandler implements HandlerMethodReturnVal
NativeWebRequest webRequest) throws Exception {
if (returnValue == null) {
mavContainer.setRequestHandled(true);
return;
}

View File

@ -42,6 +42,7 @@ public class CallableMethodReturnValueHandler implements HandlerMethodReturnValu
NativeWebRequest webRequest) throws Exception {
if (returnValue == null) {
mavContainer.setRequestHandled(true);
return;
}

View File

@ -41,6 +41,7 @@ public class DeferredResultMethodReturnValueHandler implements HandlerMethodRetu
NativeWebRequest webRequest) throws Exception {
if (returnValue == null) {
mavContainer.setRequestHandled(true);
return;
}