mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +00:00
Merge branch 'master' of ssh://oss.readytalk.com/var/local/git/avian
This commit is contained in:
commit
0df3beef06
@ -38,16 +38,18 @@ public class BufferedReader extends Reader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (position >= limit) {
|
if (position >= limit) {
|
||||||
return sb.toString();
|
return sb.length() == 0 ? null : sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = position; i < limit; ++i) {
|
for (int i = position; i < limit; ++i) {
|
||||||
if (buffer[i] == '\n') {
|
if (buffer[i] == '\n') {
|
||||||
sb.append(buffer, position, i);
|
sb.append(buffer, position, i - position);
|
||||||
position = i + 1;
|
position = i + 1;
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sb.append(buffer, position, limit-position);
|
||||||
|
position = limit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user