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
This commit is contained in:
parent
6b6f723179
commit
012ca3e055
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2001-08-05 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* java/io/StringWriter.java: Merged with Classpath.
|
* java/io/StringWriter.java: Merged with Classpath.
|
||||||
|
|
|
@ -149,7 +149,9 @@ public class InputStreamReader extends Reader
|
||||||
// We have knowledge of the internals of BufferedInputStream
|
// We have knowledge of the internals of BufferedInputStream
|
||||||
// here. Eww.
|
// here. Eww.
|
||||||
in.mark (0);
|
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 ();
|
in.reset ();
|
||||||
if (! r)
|
if (! r)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue