]> source.dussan.org Git - poi.git/commitdiff
Added arg check to NumericFunction.singleOperandEvaluate().
authorJosh Micich <josh@apache.org>
Wed, 23 Dec 2009 04:40:14 +0000 (04:40 +0000)
committerJosh Micich <josh@apache.org>
Wed, 23 Dec 2009 04:40:14 +0000 (04:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@893403 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java

index 3d32925ae3964bd881aa77e930443d629a7c81e9..28aed5cc2855862a4dfa6a2efe59f6e5f3c68ad6 100644 (file)
@@ -34,6 +34,9 @@ public abstract class NumericFunction implements Function {
        static final double LOG_10_TO_BASE_e = Math.log(TEN);
 
        protected static final double singleOperandEvaluate(ValueEval arg, int srcRowIndex, int srcColumnIndex) throws EvaluationException {
+               if (arg == null) {
+                       throw new IllegalArgumentException("arg must not be null");
+               }
                ValueEval ve = OperandResolver.getSingleValue(arg, srcRowIndex, srcColumnIndex);
                double result = OperandResolver.coerceValueToDouble(ve);
                checkValue(result);