>>>>> "Mark" == Mark Wielaard <[EMAIL PROTECTED]> writes:
Mark> This breaks loading resources from zip files (at least with jamvm).
I'm reverting the patch for now.
I'll debug it later and write a new mauve test as well.
Sorry about that.
Tom
Index: ChangeLog
from Tom Tromey <[EMAIL PROTECTED]>
* java/util/zip/InflaterInputStream.java: Reverted previous
patch.
Index: java/util/zip/InflaterInputStream.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/zip/InflaterInputStream.java,v
retrieving revision 1.18
diff -u -r1.18 InflaterInputStream.java
--- java/util/zip/InflaterInputStream.java 10 Mar 2006 21:16:05 -0000 1.18
+++ java/util/zip/InflaterInputStream.java 11 Mar 2006 17:59:30 -0000
@@ -186,35 +186,31 @@
throw new IOException("stream closed");
if (len == 0)
return 0;
- if (inf.finished())
- return - 1;
int count = 0;
- while (count == 0)
+ for (;;)
{
- if (inf.needsInput())
- fill();
-
- try
- {
- count = inf.inflate(b, off, len);
- }
- catch (DataFormatException dfe)
- {
- throw new ZipException(dfe.getMessage());
- }
- if (count == 0)
- {
- if (this.len == - 1)
- {
- // Couldn't get any more data to feed to the Inflater
- return - 1;
- }
- if (inf.needsDictionary())
- throw new ZipException("Inflater needs Dictionary");
- }
+
+ try
+ {
+ count = inf.inflate(b, off, len);
+ }
+ catch (DataFormatException dfe)
+ {
+ throw new ZipException(dfe.getMessage());
+ }
+
+ if (count > 0)
+ return count;
+
+ if (inf.needsDictionary()
+ | inf.finished())
+ return -1;
+ else if (inf.needsInput())
+ fill();
+ else
+ throw new InternalError("Don't know what to do");
}
- return count;
}
/**