MethodInvokingSource now returns null when the method invocation result is null.
This commit is contained in:
@@ -60,7 +60,11 @@ public class MethodInvokingSource implements PollableSource<Object>, Initializin
|
||||
this.afterPropertiesSet();
|
||||
}
|
||||
try {
|
||||
return new GenericMessage<Object>(this.invoker.invokeMethod(new Object[] {}));
|
||||
Object result = this.invoker.invokeMethod(new Object[] {});
|
||||
if (result == null) {
|
||||
return null;
|
||||
}
|
||||
return new GenericMessage<Object>(result);
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new MessagingException(
|
||||
"Source method '" + this.methodName + "' threw an Exception.", e.getTargetException());
|
||||
|
||||
Reference in New Issue
Block a user