Leniently accept custom DeferredResult etc subclasses for null values

Issue: SPR-14423
This commit is contained in:
Juergen Hoeller
2016-07-02 12:55:30 +02:00
parent 498d896ef0
commit cfc560c4c4
3 changed files with 63 additions and 29 deletions

View File

@@ -283,10 +283,10 @@ public class InvocableHandlerMethod extends HandlerMethod {
if (this.returnValue != null) {
return this.returnValue.getClass();
}
if (ResolvableType.NONE.equals(this.returnType)) {
throw new IllegalArgumentException("Expected Future-like type with generic parameter");
if (!ResolvableType.NONE.equals(this.returnType)) {
return this.returnType.getRawClass();
}
return this.returnType.getRawClass();
return super.getParameterType();
}
@Override