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
public double getDouble()
{
final Double number = baseSelector.get().asDouble();
return number != null ? number.doubleValue() : nullValue;
final ExprEval exprEval = baseSelector.get();
return exprEval.isNull() ? nullValue : exprEval.asDouble();
}
@Override