mirror of https://github.com/apache/poi.git
added a unit test for not reproducible bug #49156
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1044647 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
72ce4e8eb7
commit
e106ef96ee
|
@ -588,4 +588,18 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
|
||||||
assertEquals("A9", cc.getCTCalcChain().getCArray(2).getR());
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue