Author: josh
Date: Wed Dec 23 04:40:14 2009
New Revision: 893403
URL: http://svn.apache.org/viewvc?rev=893403&view=rev
Log:
Added arg check to NumericFunction.singleOperandEvaluate().
Modified:
poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java
Modified:
poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java
URL:
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java?rev=893403&r1=893402&r2=893403&view=diff
==============================================================================
---
poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java
(original)
+++
poi/trunk/src/java/org/apache/poi/hssf/record/formula/functions/NumericFunction.java
Wed Dec 23 04:40:14 2009
@@ -34,6 +34,9 @@
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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]