Leniently accept custom DeferredResult etc subclasses for null values

Issue: SPR-14423
(cherry picked from commit cfc560c)
This commit is contained in:
Juergen Hoeller
2016-07-02 12:55:30 +02:00
parent 3d106eb655
commit 4ddd9572f7
3 changed files with 81 additions and 38 deletions

View File

@@ -277,10 +277,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