test coverage. now > 95%
This commit is contained in:
@@ -119,8 +119,7 @@ public class SpelExpression implements Expression {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public Class getValueType(EvaluationContext context) throws EvaluationException {
|
||||
// TODO is this a legal implementation? The null return value could be very unhelpful. See other getValueType()
|
||||
// also.
|
||||
// TODO both getValueType() methods could use getValueInternal and return a type descriptor from the resultant TypedValue
|
||||
Object value = getValue(context);
|
||||
return (value != null ? value.getClass() : null);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,8 @@ public abstract class SpelNodeImpl implements SpelNode, CommonTypeDescriptors {
|
||||
|
||||
public SpelNodeImpl(int pos, SpelNodeImpl... operands) {
|
||||
this.pos = pos;
|
||||
if (pos==0) {
|
||||
// pos embodies start and end so can never be zero because tokens cannot be zero length
|
||||
throw new IllegalStateException("Node cannot have zero position: "+this.getClass());
|
||||
}
|
||||
// pos combines start and end so can never be zero because tokens cannot be zero length
|
||||
assert pos!=0;
|
||||
if (operands!=null && operands.length>0) {
|
||||
this.children = operands;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user