aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/documentation/content/xdocs/status.xml1
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml
index 665a6cb18b..31402b1482 100644
--- a/src/documentation/content/xdocs/status.xml
+++ b/src/documentation/content/xdocs/status.xml
@@ -34,6 +34,7 @@
<changes>
<release version="3.8-beta6" date="2012-??-??">
+ <action dev="poi-developers" type="fix">52665 - When reading from a ZipFileZipEntrySource that has already been closed, give IllegalArgumentException rather than NPE</action>
<action dev="poi-developers" type="fix">52664 - MAPIMessage may not always have name chunks when checking for 7 bit encodings</action>
<action dev="poi-developers" type="fix">52649 - fixed namespace issue in WordToFoConverter</action>
<action dev="poi-developers" type="fix">52385 - avoid trancated array and vector data when reading OLE properties</action>
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java b/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java
index 5c2b7b35e4..f4117f44bf 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java
@@ -41,10 +41,16 @@ public class ZipFileZipEntrySource implements ZipEntrySource {
}
public Enumeration<? extends ZipEntry> getEntries() {
+ if (zipArchive == null)
+ throw new IllegalStateException("Zip File is closed");
+
return zipArchive.entries();
}
public InputStream getInputStream(ZipEntry entry) throws IOException {
+ if (zipArchive == null)
+ throw new IllegalStateException("Zip File is closed");
+
return zipArchive.getInputStream(entry);
}
}