mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
Added support for non POSIX line endings. Will now accept: \r and \r\n as line endings (per Sun's JavaDoc)
This commit is contained in:
parent
5542ad4ed4
commit
c75b06ddc1
@ -42,9 +42,12 @@ public class BufferedReader extends Reader {
|
||||
}
|
||||
|
||||
for (int i = position; i < limit; ++i) {
|
||||
if (buffer[i] == '\n') {
|
||||
if (buffer[i] == '\n' || buffer[i] == '\r') {
|
||||
sb.append(buffer, position, i - position);
|
||||
position = i + 1;
|
||||
if(buffer[i+1] != null && buffer[i+1] == '\n') {
|
||||
position = i + 1;
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user