Browse Source

findbugs issue addressed

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1269 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Andy Clement 17 years ago
parent
commit
3c402eb54c
  1. 8
      org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/Projection.java

8
org.springframework.expression/src/main/java/org/springframework/expression/spel/ast/Projection.java

@ -88,8 +88,12 @@ public class Projection extends SpelNodeImpl {
} }
return new TypedValue(result,op.getTypeDescriptor()); return new TypedValue(result,op.getTypeDescriptor());
} else { } else {
if (operand==null && nullSafe) { if (operand==null) {
return TypedValue.NULL_TYPED_VALUE; if (nullSafe) {
return TypedValue.NULL_TYPED_VALUE;
} else {
throw new SpelEvaluationException(getStartPosition(),SpelMessages.PROJECTION_NOT_SUPPORTED_ON_TYPE, "null");
}
} else { } else {
throw new SpelEvaluationException(getStartPosition(),SpelMessages.PROJECTION_NOT_SUPPORTED_ON_TYPE, operand.getClass().getName()); throw new SpelEvaluationException(getStartPosition(),SpelMessages.PROJECTION_NOT_SUPPORTED_ON_TYPE, operand.getClass().getName());
} }

Loading…
Cancel
Save