File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/java/com/fasterxml/sort/std Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -77,15 +77,17 @@ public byte[] readNext() throws IOException
77
77
return null ;
78
78
}
79
79
}
80
- final int start = _inputPtr ;
81
80
82
81
// first thing(s) first: skip a linefeed we might have
83
82
if (_hadCR ) {
84
- if (!_skipCR ()) {
83
+ if (!_skipLF ()) {
85
84
return null ;
86
85
}
87
86
}
88
87
88
+ // set the start point after our call to _skipLF() so that if a linefeed is skipped, we also skip it in Arrays.copyOfRange below
89
+ final int start = _inputPtr ;
90
+
89
91
// then common case: we find full row:
90
92
final int end = _inputEnd ;
91
93
while (_inputPtr < end ) {
@@ -145,7 +147,7 @@ protected boolean _loadMore() throws IOException
145
147
return true ;
146
148
}
147
149
148
- protected boolean _skipCR () throws IOException
150
+ protected boolean _skipLF () throws IOException
149
151
{
150
152
_hadCR = false ;
151
153
if (_inputBuffer [_inputPtr ] == BYTE_LF ) {
You can’t perform that action at this time.
0 commit comments