aboutsummaryrefslogtreecommitdiffstats
path: root/poi
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2021-10-14 22:43:56 +0000
committerAndreas Beeker <kiwiwings@apache.org>2021-10-14 22:43:56 +0000
commitc6f7087f4fc38512504f19dca09db4176bb02430 (patch)
tree193b1e90ab8437483bd5fe661b7f2b2c31c2deb0 /poi
parent9bd8215fa301c3480839d3487b00b28bb63e74be (diff)
downloadpoi-c6f7087f4fc38512504f19dca09db4176bb02430.tar.gz
poi-c6f7087f4fc38512504f19dca09db4176bb02430.zip
#65634 - NotOLE2FileException not thrown in POI 5.0.0 by opening an XML-RAW File with SlideShowFactory.create()
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894271 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r--poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java b/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
index 5a5facb0cf..465c6f978b 100644
--- a/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
+++ b/poi/src/main/java/org/apache/poi/sl/usermodel/SlideShowFactory.java
@@ -194,7 +194,7 @@ public final class SlideShowFactory {
}
if (FileMagic.OLE2 != fm) {
- throw new IOException("Can't open SlideShow - unsupported file type: "+fm);
+ throw new IOException("Can't open slideshow - unsupported file type: "+fm);
}
POIFSFileSystem poifs = new POIFSFileSystem(is);
@@ -276,9 +276,9 @@ public final class SlideShowFactory {
ooxmlEnc = root.hasEntry(Decryptor.DEFAULT_POIFS_ENTRY) || root.hasEntry(OOXML_PACKAGE);
}
return wp(ooxmlEnc ? FileMagic.OOXML : fm, w -> w.create(file, password, readOnly));
+ } else {
+ throw new IOException("Can't open slideshow - unsupported file type: "+fm);
}
-
- return null;
}