Commit 012ca3e0 by Tom Tromey Committed by Tom Tromey

InputStreamReader.java (refill): Only call refill on BufferedInputStream when…

InputStreamReader.java (refill): Only call refill on BufferedInputStream when appropriate constraints are met.

	* java/io/InputStreamReader.java (refill): Only call refill on
	BufferedInputStream when appropriate constraints are met.

From-SVN: r44675
parent 6b6f7231
2001-08-06 Tom Tromey <tromey@redhat.com>
* java/io/InputStreamReader.java (refill): Only call refill on
BufferedInputStream when appropriate constraints are met.
2001-08-05 Tom Tromey <tromey@redhat.com>
* java/io/StringWriter.java: Merged with Classpath.
......
......@@ -149,7 +149,9 @@ public class InputStreamReader extends Reader
// We have knowledge of the internals of BufferedInputStream
// here. Eww.
in.mark (0);
boolean r = in.refill ();
// BufferedInputStream.refill() can only be called when
// `pos>=count'.
boolean r = in.pos < in.count || in.refill ();
in.reset ();
if (! r)
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment