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);
|
lineBuf.append((char) b);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ( lineBuf.length() > 0 &&
|
if (lineBuf.length() > 0 ) {
|
||||||
lineBuf.charAt(lineBuf.length() - 1) == '\r') {
|
while (lineBuf.charAt(lineBuf.length() - 1) == '\r') {
|
||||||
lineBuf.setLength(lineBuf.length() - 1);
|
lineBuf.setLength(lineBuf.length() - 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return lineBuf.toString();
|
return lineBuf.toString();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user