- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
  P3                     
     - 
    Affects Version/s: 1.2.0
 - 
    Component/s: tools
 
- 
        1.2fcs
 - 
        sparc
 - 
        solaris_2.5
 - 
        Verified
 
Name: sdC67446 Date: 02/13/98
method java.util.zip.ZipOutputStream.putNextEntry doesn't throw IOException when
stream is closed.
Here is the test demonstrating the bug:
-----------------Test.java------------------------
import java.util.zip.*;
import java.io.*;
public class Test {
public static void main(String[] args) {
try {
OutputStream bos = new ByteArrayOutputStream();
ZipOutputStream zos = new ZipOutputStream(bos);
zos.putNextEntry(new ZipEntry("1"));
zos.write(1);
zos.closeEntry();
zos.close();
zos.putNextEntry(new ZipEntry("2"));
zos.write(2);
System.out.println("Wrong way.");
} catch ( IOException e ) {
System.out.println(e);
}
}
}
---------Output from the test---------------------
Wrong way.
--------------------------------------------------
======================================================================