mirror of https://github.com/apache/poi.git
Fix bug #52665 - When reading from a ZipFileZipEntrySource that has already been closed, give IllegalArgumentException rather than NPE
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1244450 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4a607e17e1
commit
1209d2fb88
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue