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:
parent
05e0b2f47c
commit
9733e4ee31
3 changed files with 31 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue