Minor fix in ExpressionSelectors to avoid potential NPE. (#4669)

This commit is contained in:
Goh Wei Xiang 2017-08-09 10:13:31 -07:00 committed by Charles Allen
parent 7454fd86a0
commit 42569e65e2
1 changed files with 2 additions and 2 deletions

View File

@ -107,8 +107,8 @@ public class ExpressionSelectors
@Override @Override
public double getDouble() public double getDouble()
{ {
final Double number = baseSelector.get().asDouble(); final ExprEval exprEval = baseSelector.get();
return number != null ? number.doubleValue() : nullValue; return exprEval.isNull() ? nullValue : exprEval.asDouble();
} }
@Override @Override