mirror of
https://github.com/corda/corda.git
synced 2025-01-23 12:58:35 +00:00
Merge remote branch 'origin/bufferedReaderFix' into oss-master
This commit is contained in:
commit
8c9bfccb9e
@ -42,7 +42,15 @@ public class BufferedReader extends Reader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (int i = position; i < limit; ++i) {
|
for (int i = position; i < limit; ++i) {
|
||||||
if (buffer[i] == '\n') {
|
if(buffer[i] == '\r') {
|
||||||
|
sb.append(buffer, position, i - position);
|
||||||
|
position = i + 1;
|
||||||
|
if(i+1 < limit && buffer[i+1] == '\n') {
|
||||||
|
position = i + 1;
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
} else if (buffer[i] == '\n') {
|
||||||
sb.append(buffer, position, i - position);
|
sb.append(buffer, position, i - position);
|
||||||
position = i + 1;
|
position = i + 1;
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user