]> source.dussan.org Git - poi.git/commitdiff
#60713 - (S)XSSFWorkbook/POIXMLDocument.write(OutputStream) closes the OutputStream
authorAndreas Beeker <kiwiwings@apache.org>
Sun, 25 Nov 2018 22:05:02 +0000 (22:05 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Sun, 25 Nov 2018 22:05:02 +0000 (22:05 +0000)
regression

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1847438 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/openxml4j/util/ZipInputStreamZipEntrySource.java

index e185239ff1c4255ecb257d39c819a4183b9259e2..0a56966d4faca3f8e81affed41cb7e94c648f9b4 100644 (file)
@@ -38,7 +38,7 @@ public class ZipInputStreamZipEntrySource implements ZipEntrySource {
        
        /**
         * Reads all the entries from the ZipInputStream 
-        *  into memory, and closes the source stream.
+        *  into memory, and don't close (since POI 4.0.1) the source stream.
         * We'll then eat lots of memory, but be able to
         *  work with the entries at-will.
         */
@@ -50,7 +50,6 @@ public class ZipInputStreamZipEntrySource implements ZipEntrySource {
                        }
                        zipEntries.put(zipEntry.getName(), new ZipArchiveFakeEntry(zipEntry, inp));
                }
-               inp.close();
        }
 
        @Override