findbugs issue addressed

This commit is contained in:
Andy Clement 2009-05-27 19:22:53 +00:00
parent e5fea54aea
commit 1746cc76d1
1 changed files with 6 additions and 2 deletions

View File

@ -88,8 +88,12 @@ public class Projection 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.PROJECTION_NOT_SUPPORTED_ON_TYPE, "null");
}
} else {
throw new SpelEvaluationException(getStartPosition(),SpelMessages.PROJECTION_NOT_SUPPORTED_ON_TYPE, operand.getClass().getName());
}