FYI: InflaterInputStream.read() patchlet

Mark Wielaard mark@klomp.org
Thu Feb 13 23:10:00 GMT 2003


Hi,

The following fixes a Mauve failure. A bug report for Classpath
indicates that this actually happens in real code.

2003-02-13  Mark Wielaard  <mark@klomp.org>
 
        * java/util/zip/InflaterInputStream.java (read): Return zero when len
        is zero.

I am committing this to branch and mainline.

Cheers,

Mark

--- java/util/zip/InflaterInputStream.java      15 Jun 2002 18:31:13 -0000     1.14
+++ java/util/zip/InflaterInputStream.java      13 Feb 2003 23:07:26 -0000
@@ -1,5 +1,5 @@
 /* InflaterInputStream.java - Input stream filter for decompressing
-   Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
  
 This file is part of GNU Classpath.
  
@@ -90,6 +90,8 @@
   {
     if (inf == null)
       throw new IOException ("stream closed");
+    if (len == 0)
+      return 0;
     if (inf.finished())
       return -1;




More information about the Java-patches mailing list