mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 23:25:24 +02:00
InputStreamReader.java (read): If length is 0, return 0.
* java/io/InputStreamReader.java (read): If length is 0, return 0. Reset `wpos' and `wcount' when buffer has been filled and emptied. * java/util/Properties.java (save): Removed `FIXME' comment. (load): Invalid characters in \u now treated as terminators. Make sure to append character resulting from `\' handling. Cast to `char' when appending to key or value. (skip_ws): Inverted test for whitespace. From-SVN: r26862
This commit is contained in:
@@ -111,6 +111,8 @@ public class InputStreamReader extends Reader
|
||||
}
|
||||
else
|
||||
{
|
||||
if (length == 0)
|
||||
return 0;
|
||||
for (;;)
|
||||
{
|
||||
in.mark(1);
|
||||
@@ -141,6 +143,11 @@ public class InputStreamReader extends Reader
|
||||
wpos = 0;
|
||||
wcount = 0;
|
||||
}
|
||||
else if (wavail == 0)
|
||||
{
|
||||
wpos = 0;
|
||||
wcount = 0;
|
||||
}
|
||||
int count = read(work, wpos, work.length-wpos);
|
||||
if (count <= 0)
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user