From: PJ Fanning Date: Sat, 12 Oct 2019 07:30:56 +0000 (+0000) Subject: add null check for XSLFShape X-Git-Tag: REL_4_1_1~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e81a348864855fa336826692abdbcff8e4c836e8;p=poi.git add null check for XSLFShape git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1868318 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShape.java b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShape.java index 346e98922b..65ad0cace5 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShape.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFShape.java @@ -83,6 +83,14 @@ public class TestXSLFShape { ppt.close(); } + @Test + public void testProblemFile() throws IOException { + try (XMLSlideShow ppt = XSLFTestDataSamples.openSampleDocument("ececapstonespring2012.pptx")) { + List slides = ppt.getSlides(); + assertEquals(24, slides.size()); + } + } + @Test public void testCreateShapes() throws IOException { XMLSlideShow ppt = new XMLSlideShow(); diff --git a/test-data/slideshow/ececapstonespring2012.pptx b/test-data/slideshow/ececapstonespring2012.pptx new file mode 100644 index 0000000000..62cfcd4895 Binary files /dev/null and b/test-data/slideshow/ececapstonespring2012.pptx differ