You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by gw...@apache.org on 2017/12/28 08:17:33 UTC
svn commit: r1819398 - in /poi/trunk/src/java/org/apache/poi/ss/formula:
OperationEvaluatorFactory.java WorkbookEvaluator.java
Author: gwoolsey
Date: Thu Dec 28 08:17:33 2017
New Revision: 1819398
URL: http://svn.apache.org/viewvc?rev=1819398&view=rev
Log:
Added a couple missing null checks.
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java
poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
Modified: poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java?rev=1819398&r1=1819397&r2=1819398&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/OperationEvaluatorFactory.java Thu Dec 28 08:17:33 2017
@@ -120,7 +120,7 @@ final class OperationEvaluatorFactory {
EvaluationSheet evalSheet = ec.getWorkbook().getSheet(ec.getSheetIndex());
EvaluationCell evalCell = evalSheet.getCell(ec.getRowIndex(), ec.getColumnIndex());
- if ((evalCell.isPartOfArrayFormulaGroup() || ec.isInArrayContext()) && result instanceof ArrayFunction)
+ if (evalCell != null && (evalCell.isPartOfArrayFormulaGroup() || ec.isInArrayContext()) && result instanceof ArrayFunction)
return ((ArrayFunction) result).evaluateArray(args, ec.getRowIndex(), ec.getColumnIndex());
return result.evaluate(args, ec.getRowIndex(), (short) ec.getColumnIndex());
Modified: poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java?rev=1819398&r1=1819397&r2=1819398&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java Thu Dec 28 08:17:33 2017
@@ -597,7 +597,7 @@ public final class WorkbookEvaluator {
EvaluationSheet evalSheet = ec.getWorkbook().getSheet(ec.getSheetIndex());
EvaluationCell evalCell = evalSheet.getCell(ec.getRowIndex(), ec.getColumnIndex());
- if (evalCell.isPartOfArrayFormulaGroup() && evaluationResult instanceof AreaEval) {
+ if (evalCell != null && evalCell.isPartOfArrayFormulaGroup() && evaluationResult instanceof AreaEval) {
value = OperandResolver.getElementFromArray((AreaEval) evaluationResult, evalCell);
}
else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org