Fix NPE in InvocableHandlerMethod

Issue: SPR-13917
This commit is contained in:
Rossen Stoyanchev
2016-02-04 23:32:22 -05:00
parent 09a40b8a08
commit 902a7287f7
2 changed files with 29 additions and 2 deletions

View File

@@ -223,7 +223,8 @@ public class InvocableHandlerMethod extends HandlerMethod {
}
catch (IllegalArgumentException ex) {
assertTargetBean(getBridgedMethod(), getBean(), args);
throw new IllegalStateException(getInvocationErrorMessage(ex.getMessage(), args), ex);
String message = (ex.getMessage() != null ? ex.getMessage() : "Illegal argument");
throw new IllegalStateException(getInvocationErrorMessage(message, args), ex);
}
catch (InvocationTargetException ex) {
// Unwrap for HandlerExceptionResolvers ...