mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user