poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1044647 - in /poi/trunk: src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java test-data/spreadsheet/49156.xlsx
Date Sat, 11 Dec 2010 13:09:13 GMT
Author: yegor
Date: Sat Dec 11 13:09:12 2010
New Revision: 1044647

URL: http://svn.apache.org/viewvc?rev=1044647&view=rev
Log:
added a unit test for not reproducible bug #49156

Added:
    poi/trunk/test-data/spreadsheet/49156.xlsx   (with props)
Modified:
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java?rev=1044647&r1=1044646&r2=1044647&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java Sat Dec
11 13:09:12 2010
@@ -588,4 +588,18 @@ public final class TestXSSFBugs extends 
        assertEquals("A9", cc.getCTCalcChain().getCArray(2).getR());
 
     }
+
+    public void test49156() throws Exception {
+        Workbook wb = XSSFTestDataSamples.openSampleWorkbook("49156.xlsx");
+        FormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();
+
+        Sheet sheet = wb.getSheetAt(0);
+        for(Row row : sheet){
+            for(Cell cell : row){
+                if(cell.getCellType() == Cell.CELL_TYPE_FORMULA){
+                    formulaEvaluator.evaluateInCell(cell); // caused NPE on some cells
+                }
+            }
+        }
+    }
 }

Added: poi/trunk/test-data/spreadsheet/49156.xlsx
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/49156.xlsx?rev=1044647&view=auto
==============================================================================
Binary file - no diff available.

Propchange: poi/trunk/test-data/spreadsheet/49156.xlsx
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message