poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1244450 - in /poi/trunk/src: documentation/content/xdocs/status.xml ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java
Date Wed, 15 Feb 2012 11:51:07 GMT
Author: nick
Date: Wed Feb 15 11:51:06 2012
New Revision: 1244450

URL: http://svn.apache.org/viewvc?rev=1244450&view=rev
Log:
Fix bug #52665 - When reading from a ZipFileZipEntrySource that has already been closed, give
IllegalArgumentException rather than NPE

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1244450&r1=1244449&r2=1244450&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Wed Feb 15 11:51:06 2012
@@ -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>

Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java?rev=1244450&r1=1244449&r2=1244450&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/util/ZipFileZipEntrySource.java Wed
Feb 15 11:51:06 2012
@@ -41,10 +41,16 @@ public class ZipFileZipEntrySource imple
    }
 
    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);
    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message