Browse Source

[bug-64508] add guard for invalid v value

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879905 13f79535-47bb-0310-9956-ffa450edef68
tags/before_ooxml_3rd_edition
PJ Fanning 3 years ago
parent
commit
26c2049147

+ 14
- 0
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java View File

@@ -105,6 +105,7 @@ import org.apache.poi.xssf.model.CalculationChain;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.apache.poi.xssf.usermodel.extensions.XSSFCellFill;
import org.apache.xmlbeans.XmlException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCalcCell;
@@ -3546,4 +3547,17 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
}
}
}

@Test
public void testBug64508() throws IOException {
try (Workbook wb = XSSFTestDataSamples.openSampleWorkbook("64508.xlsx")) {
int activeSheet = wb.getActiveSheetIndex();
Sheet sheet1 = wb.getSheetAt(activeSheet);
Row row = sheet1.getRow(1);
CellReference aCellReference = new CellReference("E2");
Cell aCell = row.getCell(aCellReference.getCol());
Assert.assertEquals(CellType.STRING, aCell.getCellType());
Assert.assertEquals("", aCell.getStringCellValue());
}
}
}

BIN
test-data/spreadsheet/64508.xlsx View File


Loading…
Cancel
Save