Synchronized between 4.1 and master (part 3)

Motivation:

4 and 5 were diverged long time ago and we recently reverted some of the
early commits in master.  We must make sure 4.1 and master are not very
different now.

Modification:

Fix found differences

Result:

4.1 and master got closer.
This commit is contained in:
Trustin Lee 2014-04-25 14:00:04 +09:00
parent b9039eaa82
commit d765f6b870
6 changed files with 7 additions and 9 deletions

View File

@ -96,7 +96,7 @@ public class HttpContentCompressor extends HttpContentEncoder {
protected Result beginEncode(HttpResponse headers, String acceptEncoding) throws Exception {
String contentEncoding = headers.headers().get(HttpHeaders.Names.CONTENT_ENCODING);
if (contentEncoding != null &&
!HttpHeaders.Values.IDENTITY.equalsIgnoreCase(contentEncoding)) {
!HttpHeaders.equalsIgnoreCase(HttpHeaders.Values.IDENTITY, contentEncoding)) {
return null;
}

View File

@ -35,8 +35,7 @@ import static io.netty.handler.codec.http.HttpVersion.*;
/**
* Handles the HTTP handshake (the HTTP Upgrade request) for {@link WebSocketServerProtocolHandler}.
*/
class WebSocketServerProtocolHandshakeHandler
extends ChannelInboundHandlerAdapter {
class WebSocketServerProtocolHandshakeHandler extends ChannelInboundHandlerAdapter {
private final String websocketPath;
private final String subprotocols;

View File

@ -116,5 +116,4 @@ public final class BinaryMemcacheClientCodec extends ChannelHandlerAppender {
}
}
}
}

View File

@ -35,7 +35,7 @@ import java.net.SocketAddress;
* By default, all events are logged at <tt>DEBUG</tt> level.
*/
@Sharable
@SuppressWarnings("StringConcatenationInsideStringBufferAppend")
@SuppressWarnings({ "StringConcatenationInsideStringBufferAppend", "StringBufferReplaceableByString" })
public class LoggingHandler extends ChannelDuplexHandler {
private static final LogLevel DEFAULT_LEVEL = LogLevel.DEBUG;
@ -202,7 +202,7 @@ public class LoggingHandler extends ChannelDuplexHandler {
if (logger.isEnabled(internalLevel)) {
logger.log(internalLevel, format(ctx, "UNREGISTERED"));
}
super.channelUnregistered(ctx);
ctx.fireChannelUnregistered();
}
@Override
@ -276,7 +276,7 @@ public class LoggingHandler extends ChannelDuplexHandler {
if (logger.isEnabled(internalLevel)) {
logger.log(internalLevel, format(ctx, "DEREGISTER"));
}
super.deregister(ctx, promise);
ctx.deregister(promise);
}
@Override

View File

@ -66,8 +66,7 @@ import java.util.Queue;
* transfer. To resume the transfer when a new chunk is available, you have to
* call {@link #resumeTransfer()}.
*/
public class ChunkedWriteHandler
extends ChannelDuplexHandler {
public class ChunkedWriteHandler extends ChannelDuplexHandler {
private static final InternalLogger logger =
InternalLoggerFactory.getInstance(ChunkedWriteHandler.class);

View File

@ -121,6 +121,7 @@ final class EmbeddedEventLoop extends AbstractEventLoop implements ChannelHandle
public EventExecutor executor() {
return this;
}
@Override
public void invokeChannelRegistered(ChannelHandlerContext ctx) {
invokeChannelRegisteredNow(ctx);