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:
Yegor Kozlov 2010-12-11 13:09:12 +00:00
parent 72ce4e8eb7
commit e106ef96ee
2 changed files with 14 additions and 0 deletions

View File

@ -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.