Skip to content

Commit 6110919

Browse files
committed
Polished exception message
1 parent c5aa0d1 commit 6110919

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private TypedValue getValueInternal(EvaluationContext evaluationContext,
109109
throwSimpleExceptionIfPossible(value, ae);
110110

111111
// At this point we know it wasn't a user problem so worth a retry if a
112-
// better candidate can be found
112+
// better candidate can be found.
113113
this.cachedExecutor = null;
114114
}
115115
}
@@ -217,9 +217,7 @@ private void throwSimpleExceptionIfPossible(Object value, AccessException ae) {
217217
}
218218
throw new ExpressionInvocationTargetException(getStartPosition(),
219219
"A problem occurred when trying to execute method '" + this.name +
220-
"' on object of type '" +
221-
value.getClass().getName() + "'",
222-
rootCause);
220+
"' on object of type [" + value.getClass().getName() + "]", rootCause);
223221
}
224222
}
225223

0 commit comments

Comments
 (0)