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
97b07620de
commit
039f4ccfa1
@ -588,4 +588,18 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
BIN
test-data/spreadsheet/49156.xlsx
Normal file
BIN
test-data/spreadsheet/49156.xlsx
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user