mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-23 04:09:42 -05:00
re PR libgcj/20389 (BufferedInputStream gets ArrayIndexOutOfBoundsExeception)
2005-03-09 David Daney <ddaney@avtrex.com> PR libgcj/20389 Merge BufferedInputStream from GNU Classpath. * java/io/BufferedInputStream.java (marktarget): Field removed. (CHUNKSIZE): Field removed. (bufferSize): New field. (BufferedInputStream): Initialize fields. (close): Invalidate mark and buffer indexes. (mark): Rewritten. (read()): Move mark handling code to refill. (read(byte[], int, int)): Ditto. (skip): Ditto and simplify EOF testing. (refill): Rewritten. * java/io/InputStreamReader.java (refill): Removed mark and reset of internal BufferedInputStream. From-SVN: r96217
This commit is contained in:
@@ -282,11 +282,9 @@ public class InputStreamReader extends Reader
|
||||
{
|
||||
// We have knowledge of the internals of BufferedInputStream
|
||||
// here. Eww.
|
||||
in.mark (0);
|
||||
// BufferedInputStream.refill() can only be called when
|
||||
// `pos>=count'.
|
||||
boolean r = in.pos < in.count || in.refill ();
|
||||
in.reset ();
|
||||
if (! r)
|
||||
return -1;
|
||||
converter.setInput(in.buf, in.pos, in.count);
|
||||
|
||||
Reference in New Issue
Block a user