A small optimization for the fix of #360
This commit is contained in:
parent
f2df20ddff
commit
7fb64e2046
@ -195,10 +195,11 @@ public class ChannelBufferInputStream extends InputStream implements DataInput {
|
||||
lineBuf.append((char) b);
|
||||
}
|
||||
|
||||
while ( lineBuf.length() > 0 &&
|
||||
lineBuf.charAt(lineBuf.length() - 1) == '\r') {
|
||||
if (lineBuf.length() > 0 ) {
|
||||
while (lineBuf.charAt(lineBuf.length() - 1) == '\r') {
|
||||
lineBuf.setLength(lineBuf.length() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
return lineBuf.toString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user