aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-07-15 20:56:59 +0000
committerPJ Fanning <fanningpj@apache.org>2020-07-15 20:56:59 +0000
commit26c2049147c488edb04bbd099ea65ef494a86c72 (patch)
treefaa59aceeb1a6f8602d4a2649e8326c8dc9da707 /src/ooxml
parent20540f3c69eb1c48a0ebbd8c49bcfe6ea6f3e165 (diff)
downloadpoi-26c2049147c488edb04bbd099ea65ef494a86c72.tar.gz
poi-26c2049147c488edb04bbd099ea65ef494a86c72.zip
[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
Diffstat (limited to 'src/ooxml')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
index bb07ede477..873d7a0699 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
@@ -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());
+ }
+ }
}