commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1084536 - in /commons/proper/compress/trunk/src: changes/changes.xml main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java
Date Wed, 23 Mar 2011 11:06:43 GMT
Author: sebb
Date: Wed Mar 23 11:06:43 2011
New Revision: 1084536

URL: http://svn.apache.org/viewvc?rev=1084536&view=rev
Log:
COMPRESS-127 Calling close() on inputStream returned by CompressorStreamFactory.createCompressorInputStream()
does not close the underlying input stream

Modified:
    commons/proper/compress/trunk/src/changes/changes.xml
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java

Modified: commons/proper/compress/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=1084536&r1=1084535&r2=1084536&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/changes/changes.xml (original)
+++ commons/proper/compress/trunk/src/changes/changes.xml Wed Mar 23 11:06:43 2011
@@ -45,6 +45,10 @@ The <action> type attribute can be add,u
   </properties>
   <body>
     <release version="1.2" date="as in SVN" description="Release 1.2">
+      <action issue="COMPRESS-127" type="fix" date="2011-03-23">
+        Calling close() on inputStream returned by CompressorStreamFactory.createCompressorInputStream()
+        does not close the underlying input stream.
+      </action> 
       <action issue="COMPRESS-122" type="add" date="2010-10-29">
         TarArchiveEntry provides access to the flags that determine
         whether it is an archived symbolic link, pipe or other

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java?rev=1084536&r1=1084535&r2=1084536&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.java
Wed Mar 23 11:06:43 2011
@@ -100,4 +100,14 @@ public class GzipCompressorInputStream e
         return true;
     }
     
+    /**
+     * Closes the input stream (unless it is System.in).
+     * 
+     * @since 1.2
+     */
+    public void close() throws IOException {
+        if (this.in != System.in) {
+            this.in.close();
+        }
+    }
 }



Mime
View raw message