Consistent instanceof/casting of Class references

This commit is contained in:
Juergen Hoeller
2016-10-30 21:40:27 +01:00
parent 7627c38695
commit ac80ac6f8b
13 changed files with 35 additions and 39 deletions

View File

@@ -59,7 +59,7 @@ public class OperatorInstanceof extends Operator {
Object leftValue = left.getValue();
Object rightValue = right.getValue();
BooleanTypedValue result = null;
if (rightValue == null || !(rightValue instanceof Class<?>)) {
if (rightValue == null || !(rightValue instanceof Class)) {
throw new SpelEvaluationException(getRightOperand().getStartPosition(),
SpelMessage.INSTANCEOF_OPERATOR_NEEDS_CLASS_OPERAND,
(rightValue == null ? "null" : rightValue.getClass().getName()));