Replace a = a + b to a += b
This commit is contained in:
parent
b1f2fe752b
commit
779ddd1d2f
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.handler.codec.http;
|
package org.jboss.netty.handler.codec.http;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.jboss.netty.buffer.ChannelBuffer;
|
import org.jboss.netty.buffer.ChannelBuffer;
|
||||||
import org.jboss.netty.buffer.ChannelBuffers;
|
import org.jboss.netty.buffer.ChannelBuffers;
|
||||||
import org.jboss.netty.channel.Channel;
|
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.frame.TooLongFrameException;
|
||||||
import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
|
import org.jboss.netty.handler.codec.replay.ReplayingDecoder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decodes {@link ChannelBuffer}s into {@link HttpMessage}s and
|
* Decodes {@link ChannelBuffer}s into {@link HttpMessage}s and
|
||||||
* {@link HttpChunk}s.
|
* {@link HttpChunk}s.
|
||||||
@ -465,7 +465,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
|||||||
if (toRead > actualReadableBytes()) {
|
if (toRead > actualReadableBytes()) {
|
||||||
toRead = actualReadableBytes();
|
toRead = actualReadableBytes();
|
||||||
}
|
}
|
||||||
contentRead = contentRead + toRead;
|
contentRead += toRead;
|
||||||
if (length < contentRead) {
|
if (length < contentRead) {
|
||||||
if (!message.isChunked()) {
|
if (!message.isChunked()) {
|
||||||
message.setChunked(true);
|
message.setChunked(true);
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.handler.codec.http;
|
package org.jboss.netty.handler.codec.http;
|
||||||
|
|
||||||
import static org.jboss.netty.handler.codec.http.HttpConstants.*;
|
|
||||||
|
|
||||||
import org.jboss.netty.buffer.ChannelBuffer;
|
import org.jboss.netty.buffer.ChannelBuffer;
|
||||||
|
|
||||||
|
import static org.jboss.netty.handler.codec.http.HttpConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Encodes an {@link HttpRequest} or an {@link HttpChunk} into
|
* Encodes an {@link HttpRequest} or an {@link HttpChunk} into
|
||||||
* a {@link ChannelBuffer}.
|
* a {@link ChannelBuffer}.
|
||||||
@ -45,7 +45,7 @@ public class HttpRequestEncoder extends HttpMessageEncoder {
|
|||||||
if (start != -1) {
|
if (start != -1) {
|
||||||
int startIndex = start + 3;
|
int startIndex = start + 3;
|
||||||
if (uri.lastIndexOf(SLASH) <= startIndex) {
|
if (uri.lastIndexOf(SLASH) <= startIndex) {
|
||||||
uri = uri + SLASH;
|
uri += SLASH;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user