poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60858] New: Sumifs throws NullPointerException
Date Mon, 13 Mar 2017 20:09:38 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60858

            Bug ID: 60858
           Summary: Sumifs throws NullPointerException
           Product: POI
           Version: 3.15-dev
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: dev@poi.apache.org
          Reporter: daniel-john@gmx.net
                CC: czamarth@gmail.com, dev@poi.apache.org,
                    kameda.sbng@gmail.com
        Depends on: 56420
  Target Milestone: ---

+++ This bug was initially created as a clone of Bug #56420 +++

When I use SUMIFS function in xlsx file.
If predicate value is cell and cell value is null,
org.apache.poi.ss.formula.functions.Sumifs.accumulate method throws
NullPointerException.

This is stack trace:

java.lang.NullPointerException
at org.apache.poi.ss.formula.functions.Sumifs.sumMatchingCells(Sumifs.java:138)
at org.apache.poi.ss.formula.functions.Sumifs.evaluate(Sumifs.java:79)
at
org.apache.poi.ss.formula.UserDefinedFunction.evaluate(UserDefinedFunction.java:61)
at
org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate(OperationEvaluatorFactory.java:129)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:550)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:317)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:259)
at
org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator.evaluateFormulaCellValue(BaseXSSFFormulaEvaluator.java:65)
at
org.apache.poi.ss.formula.BaseFormulaEvaluator.evaluateFormulaCellEnum(BaseFormulaEvaluator.java:193)
at
org.apache.poi.ss.formula.BaseFormulaEvaluator.evaluateAllFormulaCells(BaseFormulaEvaluator.java:268)
at
org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateAll(XSSFFormulaEvaluator.java:92)

And this is the code that throws NullPointerException:

if (!mp.matches(aeRange.getRelativeValue(r, c))) {
                        matches = false;
                        break;
                    }

It is the same problem as in Bug #56420.


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=56420
[Bug 56420] Sumif throws NullPointerException
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message