A small optimization for the fix of #360

This commit is contained in:
norman 2012-05-24 08:47:35 +02:00 committed by Trustin Lee
parent f2df20ddff
commit 7fb64e2046

View File

@ -195,9 +195,10 @@ 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();