Replace a = a + b to a += b

This commit is contained in:
Trustin Lee 2012-11-09 17:19:30 +09:00
parent b1f2fe752b
commit 779ddd1d2f
2 changed files with 6 additions and 6 deletions

View File

@ -15,8 +15,6 @@
*/
package org.jboss.netty.handler.codec.http;
import java.util.List;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
@ -25,6 +23,8 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.frame.TooLongFrameException;
import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
import java.util.List;
/**
* Decodes {@link ChannelBuffer}s into {@link HttpMessage}s and
* {@link HttpChunk}s.
@ -465,7 +465,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
if (toRead > actualReadableBytes()) {
toRead = actualReadableBytes();
}
contentRead = contentRead + toRead;
contentRead += toRead;
if (length < contentRead) {
if (!message.isChunked()) {
message.setChunked(true);

View File

@ -15,10 +15,10 @@
*/
package org.jboss.netty.handler.codec.http;
import static org.jboss.netty.handler.codec.http.HttpConstants.*;
import org.jboss.netty.buffer.ChannelBuffer;
import static org.jboss.netty.handler.codec.http.HttpConstants.*;
/**
* Encodes an {@link HttpRequest} or an {@link HttpChunk} into
* a {@link ChannelBuffer}.
@ -45,7 +45,7 @@ public class HttpRequestEncoder extends HttpMessageEncoder {
if (start != -1) {
int startIndex = start + 3;
if (uri.lastIndexOf(SLASH) <= startIndex) {
uri = uri + SLASH;
uri += SLASH;
}
}