test coverage

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1270 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Andy Clement
2009-05-27 19:37:17 +00:00
parent 3c402eb54c
commit bdb2b0bbb1
3 changed files with 27 additions and 4 deletions
@@ -132,12 +132,17 @@ public class Selection extends SpelNodeImpl {
}
return new TypedValue(result,op.getTypeDescriptor());
} else {
if (operand==null && nullSafe) {
return TypedValue.NULL_TYPED_VALUE;
if (operand==null) {
if (nullSafe) {
return TypedValue.NULL_TYPED_VALUE;
} else {
throw new SpelEvaluationException(getStartPosition(), SpelMessages.INVALID_TYPE_FOR_SELECTION,
"null");
}
} else {
throw new SpelEvaluationException(getStartPosition(), SpelMessages.INVALID_TYPE_FOR_SELECTION,
(operand == null ? "null" : operand.getClass().getName()));
}
operand.getClass().getName());
}
}
}