commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1362311 - /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
Date Mon, 16 Jul 2012 23:32:45 GMT
Author: sebb
Date: Mon Jul 16 23:32:45 2012
New Revision: 1362311

URL: http://svn.apache.org/viewvc?rev=1362311&view=rev
Log:
Cannot use close on null underlying stream

Modified:
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java?rev=1362311&r1=1362310&r2=1362311&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryTest.java
Mon Jul 16 23:32:45 2012
@@ -18,6 +18,7 @@
 
 package org.apache.commons.compress.archivers.zip;
 
+import java.io.ByteArrayOutputStream;
 import java.util.zip.ZipEntry;
 
 import junit.framework.TestCase;
@@ -206,7 +207,7 @@ public class ZipArchiveEntryTest extends
      */
     public void testCompressionMethod() throws Exception {
         ZipArchiveOutputStream zos =
-            new ZipArchiveOutputStream((java.io.OutputStream) null);
+            new ZipArchiveOutputStream(new ByteArrayOutputStream());
         ZipArchiveEntry entry = new ZipArchiveEntry("foo");
         assertEquals(-1, entry.getMethod());
         assertFalse(zos.canWriteEntryData(entry));



Mime
View raw message