aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/testcases
diff options
context:
space:
mode:
Diffstat (limited to 'src/ooxml/testcases')
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java b/src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java
index e31254b641..49742dc9d9 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/eventusermodel/TestXSSFReader.java
@@ -246,4 +246,23 @@ public final class TestXSSFReader extends TestCase {
pkg.close();
}
+
+ /**
+ * NPE when sheet has no relationship id in the workbook
+ * 60825
+ */
+ public void testSheetWithNoRelationshipId() throws Exception {
+ OPCPackage pkg = XSSFTestDataSamples.openSamplePackage("60825.xlsx");
+ ReadOnlySharedStringsTable strings = new ReadOnlySharedStringsTable(pkg);
+ assertNotNull(strings);
+ XSSFReader reader = new XSSFReader(pkg);
+ StylesTable styles = reader.getStylesTable();
+ assertNotNull(styles);
+
+ XSSFReader.SheetIterator iter = (XSSFReader.SheetIterator) reader.getSheetsData();
+ assertNotNull(iter.next());
+ assertFalse(iter.hasNext());
+
+ pkg.close();
+ }
}