You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the Stream specification, the close() method should recursively call the child's correspondent method so that the user does not have to iterate all over the nested childs. As far as I can see, the ZipOutputStream.close() method does not call the ZipOutputStream.closeEntry(), thus leaving the stream in an inconsistent value.
To prove this behavior it's sufficient to close the stream without explicitly calling the closeEntry() method: in this case the JVM will throw an exception (java.io.IOException: java.util.zip.DataFormatException: invalid stored block lengths).
The text was updated successfully, but these errors were encountered:
As per the Stream specification, the close() method should recursively call the child's correspondent method so that the user does not have to iterate all over the nested childs. As far as I can see, the ZipOutputStream.close() method does not call the ZipOutputStream.closeEntry(), thus leaving the stream in an inconsistent value.
To prove this behavior it's sufficient to close the stream without explicitly calling the closeEntry() method: in this case the JVM will throw an exception (java.io.IOException: java.util.zip.DataFormatException: invalid stored block lengths).
The text was updated successfully, but these errors were encountered: