diff --git a/src/main/java/org/jboss/netty/bootstrap/Bootstrap.java b/src/main/java/org/jboss/netty/bootstrap/Bootstrap.java index afb53a4e55..33d8380e87 100644 --- a/src/main/java/org/jboss/netty/bootstrap/Bootstrap.java +++ b/src/main/java/org/jboss/netty/bootstrap/Bootstrap.java @@ -60,7 +60,6 @@ public class Bootstrap implements ExternalResourceReleasable { * I/O operation is requested. */ protected Bootstrap() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/bootstrap/ClientBootstrap.java b/src/main/java/org/jboss/netty/bootstrap/ClientBootstrap.java index 788aca216c..7656230f78 100644 --- a/src/main/java/org/jboss/netty/bootstrap/ClientBootstrap.java +++ b/src/main/java/org/jboss/netty/bootstrap/ClientBootstrap.java @@ -118,7 +118,6 @@ public class ClientBootstrap extends Bootstrap { * operation is requested. */ public ClientBootstrap() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/bootstrap/ConnectionlessBootstrap.java b/src/main/java/org/jboss/netty/bootstrap/ConnectionlessBootstrap.java index 4f5d5b46e3..094fc68142 100644 --- a/src/main/java/org/jboss/netty/bootstrap/ConnectionlessBootstrap.java +++ b/src/main/java/org/jboss/netty/bootstrap/ConnectionlessBootstrap.java @@ -127,7 +127,6 @@ public class ConnectionlessBootstrap extends Bootstrap { * operation is requested. */ public ConnectionlessBootstrap() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/bootstrap/ServerBootstrap.java b/src/main/java/org/jboss/netty/bootstrap/ServerBootstrap.java index c915a3b9a0..e4a4feb1d1 100644 --- a/src/main/java/org/jboss/netty/bootstrap/ServerBootstrap.java +++ b/src/main/java/org/jboss/netty/bootstrap/ServerBootstrap.java @@ -170,7 +170,6 @@ public class ServerBootstrap extends Bootstrap { * operation is requested. */ public ServerBootstrap() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/buffer/ChannelBuffers.java b/src/main/java/org/jboss/netty/buffer/ChannelBuffers.java index 02f27d2af3..673e1b3fbd 100644 --- a/src/main/java/org/jboss/netty/buffer/ChannelBuffers.java +++ b/src/main/java/org/jboss/netty/buffer/ChannelBuffers.java @@ -804,8 +804,7 @@ public class ChannelBuffers { } private static ChannelBuffer copiedBuffer(ByteOrder endianness, CharBuffer buffer, Charset charset) { - CharBuffer src = buffer; - ByteBuffer dst = ChannelBuffers.encodeString(src, charset); + ByteBuffer dst = ChannelBuffers.encodeString(buffer, charset); ChannelBuffer result = wrappedBuffer(endianness, dst.array()); result.writerIndex(dst.remaining()); return result; diff --git a/src/main/java/org/jboss/netty/buffer/HeapChannelBufferFactory.java b/src/main/java/org/jboss/netty/buffer/HeapChannelBufferFactory.java index 92904a38e3..7296f8b943 100644 --- a/src/main/java/org/jboss/netty/buffer/HeapChannelBufferFactory.java +++ b/src/main/java/org/jboss/netty/buffer/HeapChannelBufferFactory.java @@ -57,7 +57,6 @@ public class HeapChannelBufferFactory extends AbstractChannelBufferFactory { * {@link ByteOrder#BIG_ENDIAN}. */ public HeapChannelBufferFactory() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/channel/AbstractChannelSink.java b/src/main/java/org/jboss/netty/channel/AbstractChannelSink.java index 79c421efbb..2ff487379a 100644 --- a/src/main/java/org/jboss/netty/channel/AbstractChannelSink.java +++ b/src/main/java/org/jboss/netty/channel/AbstractChannelSink.java @@ -31,7 +31,6 @@ public abstract class AbstractChannelSink implements ChannelSink { * Creates a new instance. */ protected AbstractChannelSink() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/channel/ChannelException.java b/src/main/java/org/jboss/netty/channel/ChannelException.java index 295aa19d7a..1ad66dc68f 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelException.java +++ b/src/main/java/org/jboss/netty/channel/ChannelException.java @@ -33,7 +33,6 @@ public class ChannelException extends RuntimeException { * Creates a new exception. */ public ChannelException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/channel/ChannelHandlerLifeCycleException.java b/src/main/java/org/jboss/netty/channel/ChannelHandlerLifeCycleException.java index 458787aa57..a94017b2dc 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelHandlerLifeCycleException.java +++ b/src/main/java/org/jboss/netty/channel/ChannelHandlerLifeCycleException.java @@ -35,7 +35,6 @@ public class ChannelHandlerLifeCycleException extends RuntimeException { * Creates a new exception. */ public ChannelHandlerLifeCycleException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/channel/ChannelPipelineException.java b/src/main/java/org/jboss/netty/channel/ChannelPipelineException.java index 9bb88c74f9..4750298132 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelPipelineException.java +++ b/src/main/java/org/jboss/netty/channel/ChannelPipelineException.java @@ -35,7 +35,6 @@ public class ChannelPipelineException extends ChannelException { * Creates a new instance. */ public ChannelPipelineException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/channel/ChannelState.java b/src/main/java/org/jboss/netty/channel/ChannelState.java index 28af7ebcb2..44f01939c5 100644 --- a/src/main/java/org/jboss/netty/channel/ChannelState.java +++ b/src/main/java/org/jboss/netty/channel/ChannelState.java @@ -100,5 +100,5 @@ public enum ChannelState { * Represents a {@link Channel}'s {@link Channel#getInterestOps() interestOps} * property */ - INTEREST_OPS; + INTEREST_OPS } diff --git a/src/main/java/org/jboss/netty/channel/DefaultChannelPipeline.java b/src/main/java/org/jboss/netty/channel/DefaultChannelPipeline.java index bc6d391ea5..57adf425b6 100644 --- a/src/main/java/org/jboss/netty/channel/DefaultChannelPipeline.java +++ b/src/main/java/org/jboss/netty/channel/DefaultChannelPipeline.java @@ -817,7 +817,6 @@ public class DefaultChannelPipeline implements ChannelPipeline { private static final class DiscardingChannelSink implements ChannelSink { DiscardingChannelSink() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/channel/SimpleChannelDownstreamHandler.java b/src/main/java/org/jboss/netty/channel/SimpleChannelDownstreamHandler.java index 42b5fadae3..56ec90cda2 100644 --- a/src/main/java/org/jboss/netty/channel/SimpleChannelDownstreamHandler.java +++ b/src/main/java/org/jboss/netty/channel/SimpleChannelDownstreamHandler.java @@ -61,7 +61,6 @@ public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler * Creates a new instance. */ public SimpleChannelDownstreamHandler() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/channel/SimpleChannelHandler.java b/src/main/java/org/jboss/netty/channel/SimpleChannelHandler.java index b81610cce6..a269780604 100644 --- a/src/main/java/org/jboss/netty/channel/SimpleChannelHandler.java +++ b/src/main/java/org/jboss/netty/channel/SimpleChannelHandler.java @@ -85,7 +85,6 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDown * Creates a new instance. */ public SimpleChannelHandler() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/channel/SimpleChannelUpstreamHandler.java b/src/main/java/org/jboss/netty/channel/SimpleChannelUpstreamHandler.java index c942b8e7d7..fe061e3fa8 100644 --- a/src/main/java/org/jboss/netty/channel/SimpleChannelUpstreamHandler.java +++ b/src/main/java/org/jboss/netty/channel/SimpleChannelUpstreamHandler.java @@ -65,7 +65,6 @@ public class SimpleChannelUpstreamHandler implements ChannelUpstreamHandler { * Creates a new instance. */ public SimpleChannelUpstreamHandler() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/channel/group/CombinedIterator.java b/src/main/java/org/jboss/netty/channel/group/CombinedIterator.java index 82f589925d..0feb943ecf 100644 --- a/src/main/java/org/jboss/netty/channel/group/CombinedIterator.java +++ b/src/main/java/org/jboss/netty/channel/group/CombinedIterator.java @@ -59,8 +59,7 @@ final class CombinedIterator implements Iterator { @Override public E next() { try { - E e = currentIterator.next(); - return e; + return currentIterator.next(); } catch (NoSuchElementException e) { if (currentIterator == i1) { currentIterator = i2; diff --git a/src/main/java/org/jboss/netty/channel/local/LocalClientChannelSink.java b/src/main/java/org/jboss/netty/channel/local/LocalClientChannelSink.java index 421d7238d2..2fecaeafc2 100644 --- a/src/main/java/org/jboss/netty/channel/local/LocalClientChannelSink.java +++ b/src/main/java/org/jboss/netty/channel/local/LocalClientChannelSink.java @@ -43,7 +43,6 @@ final class LocalClientChannelSink extends AbstractChannelSink { private static final InternalLogger logger = InternalLoggerFactory.getInstance(LocalClientChannelSink.class); LocalClientChannelSink() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/channel/local/LocalServerChannelSink.java b/src/main/java/org/jboss/netty/channel/local/LocalServerChannelSink.java index 6d3ed7730d..00e6eb1a7c 100644 --- a/src/main/java/org/jboss/netty/channel/local/LocalServerChannelSink.java +++ b/src/main/java/org/jboss/netty/channel/local/LocalServerChannelSink.java @@ -36,7 +36,6 @@ import org.jboss.netty.channel.MessageEvent; final class LocalServerChannelSink extends AbstractChannelSink { LocalServerChannelSink() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelMessageUtils.java b/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelMessageUtils.java index 54ed0812f9..736fe28df3 100644 --- a/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelMessageUtils.java +++ b/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelMessageUtils.java @@ -252,9 +252,7 @@ public class HttpTunnelMessageUtils { } public static HttpResponse createTunnelCloseResponse() { - HttpResponse response = - createResponseTemplate(HttpResponseStatus.RESET_CONTENT, null); - return response; + return createResponseTemplate(HttpResponseStatus.RESET_CONTENT, null); } public static boolean isTunnelCloseResponse(HttpResponse response) { diff --git a/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelServerChannel.java b/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelServerChannel.java index 388d61b750..34d08efdee 100644 --- a/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelServerChannel.java +++ b/src/main/java/org/jboss/netty/channel/socket/http/HttpTunnelServerChannel.java @@ -103,7 +103,6 @@ public class HttpTunnelServerChannel extends AbstractServerChannel implements HttpTunnelAcceptedChannelFactory { TunnelCreator() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/channel/socket/http/ServerMessageSwitch.java b/src/main/java/org/jboss/netty/channel/socket/http/ServerMessageSwitch.java index 64cf9cbe08..c0225d0c1c 100644 --- a/src/main/java/org/jboss/netty/channel/socket/http/ServerMessageSwitch.java +++ b/src/main/java/org/jboss/netty/channel/socket/http/ServerMessageSwitch.java @@ -258,7 +258,6 @@ class ServerMessageSwitch implements ServerMessageSwitchUpstreamInterface, private static final class TunnelInfo { TunnelInfo() { - super(); } public String tunnelId; diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java index 96bb3e751a..276dd2c929 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioClientSocketPipelineSink.java @@ -173,7 +173,6 @@ class NioClientSocketPipelineSink extends AbstractChannelSink { private final Queue registerTaskQueue = new LinkedTransferQueue(); Boss() { - super(); } void register(NioClientSocketChannel channel) { diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioDatagramChannel.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioDatagramChannel.java index 724a1f44b9..b8b7cecf64 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioDatagramChannel.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioDatagramChannel.java @@ -260,7 +260,6 @@ class NioDatagramChannel extends AbstractChannel private final ThreadLocalBoolean notifying = new ThreadLocalBoolean(); WriteRequestQueue() { - super(); } /** @@ -330,7 +329,6 @@ class NioDatagramChannel extends AbstractChannel */ private final class WriteTask implements Runnable { WriteTask() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioProviderMetadata.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioProviderMetadata.java index 8d794db33e..e1c966ee77 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioProviderMetadata.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioProviderMetadata.java @@ -220,7 +220,6 @@ class NioProviderMetadata { private static final class ConstraintLevelAutodetector { ConstraintLevelAutodetector() { - super(); } int autodetect() { diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/NioSocketChannel.java b/src/main/java/org/jboss/netty/channel/socket/nio/NioSocketChannel.java index 4e35bc17c8..f4142815ba 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/NioSocketChannel.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/NioSocketChannel.java @@ -206,7 +206,6 @@ class NioSocketChannel extends AbstractChannel private final ThreadLocalBoolean notifying = new ThreadLocalBoolean(); WriteRequestQueue() { - super(); } @Override @@ -265,7 +264,6 @@ class NioSocketChannel extends AbstractChannel private final class WriteTask implements Runnable { WriteTask() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/SocketSendBufferPool.java b/src/main/java/org/jboss/netty/channel/socket/nio/SocketSendBufferPool.java index 237d52451c..54e10cc0ff 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/SocketSendBufferPool.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/SocketSendBufferPool.java @@ -42,7 +42,6 @@ final class SocketSendBufferPool { Preallocation current = new Preallocation(DEFAULT_PREALLOCATION_SIZE); SocketSendBufferPool() { - super(); } SendBuffer acquire(Object message) { @@ -316,7 +315,6 @@ final class SocketSendBufferPool { static final class EmptySendBuffer implements SendBuffer { EmptySendBuffer() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/example/http/upload/HttpRequestHandler.java b/src/main/java/org/jboss/netty/example/http/upload/HttpRequestHandler.java index 53200454cd..dfe3d4425f 100644 --- a/src/main/java/org/jboss/netty/example/http/upload/HttpRequestHandler.java +++ b/src/main/java/org/jboss/netty/example/http/upload/HttpRequestHandler.java @@ -267,7 +267,6 @@ public class HttpRequestHandler extends SimpleChannelUpstreamHandler { // end responseContent .append("\r\n\r\nEND OF CONTENT CHUNK BY CHUNK\r\n\r\n"); - return; } } diff --git a/src/main/java/org/jboss/netty/example/http/websocketx/autobahn/WebSocketServerHandler.java b/src/main/java/org/jboss/netty/example/http/websocketx/autobahn/WebSocketServerHandler.java index f3a084282f..2714ab01a7 100644 --- a/src/main/java/org/jboss/netty/example/http/websocketx/autobahn/WebSocketServerHandler.java +++ b/src/main/java/org/jboss/netty/example/http/websocketx/autobahn/WebSocketServerHandler.java @@ -84,7 +84,6 @@ public class WebSocketServerHandler extends SimpleChannelUpstreamHandler { } else { this.handshaker.executeOpeningHandshake(ctx, req); } - return; } private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) { diff --git a/src/main/java/org/jboss/netty/example/http/websocketx/client/App.java b/src/main/java/org/jboss/netty/example/http/websocketx/client/App.java index 1112c45cf7..3d1c3ab8bf 100644 --- a/src/main/java/org/jboss/netty/example/http/websocketx/client/App.java +++ b/src/main/java/org/jboss/netty/example/http/websocketx/client/App.java @@ -98,7 +98,6 @@ public class App { public ArrayList messagesReceived = new ArrayList(); public MyCallbackHandler() { - return; } @Override diff --git a/src/main/java/org/jboss/netty/example/http/websocketx/server/WebSocketServerHandler.java b/src/main/java/org/jboss/netty/example/http/websocketx/server/WebSocketServerHandler.java index d2b2d6ac85..2fd373bdc7 100644 --- a/src/main/java/org/jboss/netty/example/http/websocketx/server/WebSocketServerHandler.java +++ b/src/main/java/org/jboss/netty/example/http/websocketx/server/WebSocketServerHandler.java @@ -104,7 +104,6 @@ public class WebSocketServerHandler extends SimpleChannelUpstreamHandler { } else { this.handshaker.executeOpeningHandshake(ctx, req); } - return; } private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) { diff --git a/src/main/java/org/jboss/netty/example/localtime/LocalTimeProtocol.java b/src/main/java/org/jboss/netty/example/localtime/LocalTimeProtocol.java index 7946fef1a8..8628f34d64 100644 --- a/src/main/java/org/jboss/netty/example/localtime/LocalTimeProtocol.java +++ b/src/main/java/org/jboss/netty/example/localtime/LocalTimeProtocol.java @@ -225,15 +225,10 @@ public final class LocalTimeProtocol { private void initFields() { continent_ = org.jboss.netty.example.localtime.LocalTimeProtocol.Continent.AFRICA; } + @Override public boolean isInitialized() { - if (!hasContinent) { - return false; - } - if (!hasCity) { - return false; - } - return true; + return hasContinent && hasCity; } @Override @@ -1000,10 +995,7 @@ public final class LocalTimeProtocol { if (!hasMinute) { return false; } - if (!hasSecond) { - return false; - } - return true; + return hasSecond; } @Override diff --git a/src/main/java/org/jboss/netty/example/qotm/QuoteOfTheMomentServerHandler.java b/src/main/java/org/jboss/netty/example/qotm/QuoteOfTheMomentServerHandler.java index cf247ea68b..43bebf29a4 100644 --- a/src/main/java/org/jboss/netty/example/qotm/QuoteOfTheMomentServerHandler.java +++ b/src/main/java/org/jboss/netty/example/qotm/QuoteOfTheMomentServerHandler.java @@ -32,7 +32,7 @@ public class QuoteOfTheMomentServerHandler extends SimpleChannelUpstreamHandler private static final Random random = new Random(); // Quotes from Mohandas K. Gandhi: - private static final String[] quotes = new String[] { + private static final String[] quotes = { "Where there is love there is life.", "First they ignore you, then they laugh at you, then they fight you, then you win.", "Be the change you want to see in the world.", diff --git a/src/main/java/org/jboss/netty/example/securechat/SecureChatKeyStore.java b/src/main/java/org/jboss/netty/example/securechat/SecureChatKeyStore.java index 707852e63b..48efac7311 100644 --- a/src/main/java/org/jboss/netty/example/securechat/SecureChatKeyStore.java +++ b/src/main/java/org/jboss/netty/example/securechat/SecureChatKeyStore.java @@ -36,7 +36,7 @@ import java.io.InputStream; * @version $Rev$, $Date$ */ public class SecureChatKeyStore { - private static final short[] DATA = new short[] { + private static final short[] DATA = { 0xfe, 0xed, 0xfe, 0xed, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, diff --git a/src/main/java/org/jboss/netty/handler/codec/compression/CompressionException.java b/src/main/java/org/jboss/netty/handler/codec/compression/CompressionException.java index bacce371ca..a939cccd5a 100644 --- a/src/main/java/org/jboss/netty/handler/codec/compression/CompressionException.java +++ b/src/main/java/org/jboss/netty/handler/codec/compression/CompressionException.java @@ -33,7 +33,6 @@ public class CompressionException extends RuntimeException { * Creates a new instance. */ public CompressionException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java index d456c678d3..2f7c17a92e 100644 --- a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java +++ b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibUtil.java @@ -58,6 +58,5 @@ final class ZlibUtil { } private ZlibUtil() { - super(); } } diff --git a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibWrapper.java b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibWrapper.java index ac598ed7dd..3c38383fd9 100644 --- a/src/main/java/org/jboss/netty/handler/codec/compression/ZlibWrapper.java +++ b/src/main/java/org/jboss/netty/handler/codec/compression/ZlibWrapper.java @@ -40,5 +40,5 @@ public enum ZlibWrapper { * Try {@link #ZLIB} first and then {@link #NONE} if the first attempt fails. * Please note that you can specify this wrapper type only when decompressing. */ - ZLIB_OR_NONE; + ZLIB_OR_NONE } diff --git a/src/main/java/org/jboss/netty/handler/codec/embedder/AbstractCodecEmbedder.java b/src/main/java/org/jboss/netty/handler/codec/embedder/AbstractCodecEmbedder.java index b9e4d6c916..fd5b6d83aa 100644 --- a/src/main/java/org/jboss/netty/handler/codec/embedder/AbstractCodecEmbedder.java +++ b/src/main/java/org/jboss/netty/handler/codec/embedder/AbstractCodecEmbedder.java @@ -194,7 +194,6 @@ abstract class AbstractCodecEmbedder implements CodecEmbedder { private final class EmbeddedChannelSink implements ChannelSink, ChannelUpstreamHandler { EmbeddedChannelSink() { - super(); } @Override @@ -234,7 +233,6 @@ abstract class AbstractCodecEmbedder implements CodecEmbedder { private static final class EmbeddedChannelPipeline extends DefaultChannelPipeline { EmbeddedChannelPipeline() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/embedder/CodecEmbedderException.java b/src/main/java/org/jboss/netty/handler/codec/embedder/CodecEmbedderException.java index b49f90a550..7c82ad99ac 100644 --- a/src/main/java/org/jboss/netty/handler/codec/embedder/CodecEmbedderException.java +++ b/src/main/java/org/jboss/netty/handler/codec/embedder/CodecEmbedderException.java @@ -33,7 +33,6 @@ public class CodecEmbedderException extends RuntimeException { * Creates a new instance. */ public CodecEmbedderException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/embedder/EmbeddedChannelFactory.java b/src/main/java/org/jboss/netty/handler/codec/embedder/EmbeddedChannelFactory.java index 0bab97f296..ab0c2c3a9d 100644 --- a/src/main/java/org/jboss/netty/handler/codec/embedder/EmbeddedChannelFactory.java +++ b/src/main/java/org/jboss/netty/handler/codec/embedder/EmbeddedChannelFactory.java @@ -29,7 +29,6 @@ class EmbeddedChannelFactory implements ChannelFactory { static final ChannelFactory INSTANCE = new EmbeddedChannelFactory(); private EmbeddedChannelFactory() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/frame/CorruptedFrameException.java b/src/main/java/org/jboss/netty/handler/codec/frame/CorruptedFrameException.java index 7cf404b174..6be6cf415e 100644 --- a/src/main/java/org/jboss/netty/handler/codec/frame/CorruptedFrameException.java +++ b/src/main/java/org/jboss/netty/handler/codec/frame/CorruptedFrameException.java @@ -34,7 +34,6 @@ public class CorruptedFrameException extends Exception { * Creates a new instance. */ public CorruptedFrameException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/frame/TooLongFrameException.java b/src/main/java/org/jboss/netty/handler/codec/frame/TooLongFrameException.java index c1aa8439b8..2714685dfb 100644 --- a/src/main/java/org/jboss/netty/handler/codec/frame/TooLongFrameException.java +++ b/src/main/java/org/jboss/netty/handler/codec/frame/TooLongFrameException.java @@ -34,7 +34,6 @@ public class TooLongFrameException extends Exception { * Creates a new instance. */ public TooLongFrameException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/http/CaseIgnoringComparator.java b/src/main/java/org/jboss/netty/handler/codec/http/CaseIgnoringComparator.java index 9cc829b469..378dba00d5 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/CaseIgnoringComparator.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/CaseIgnoringComparator.java @@ -31,7 +31,6 @@ final class CaseIgnoringComparator implements Comparator, Serializable { static final CaseIgnoringComparator INSTANCE = new CaseIgnoringComparator(); private CaseIgnoringComparator() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/http/DefaultCookie.java b/src/main/java/org/jboss/netty/handler/codec/http/DefaultCookie.java index 90fdf70dfa..d938b21069 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/DefaultCookie.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/DefaultCookie.java @@ -288,11 +288,7 @@ public class DefaultCookie implements Cookie { } else if (that.getDomain() == null) { return false; } - if (!getDomain().equalsIgnoreCase(that.getDomain())) { - return false; - } - - return true; + return getDomain().equalsIgnoreCase(that.getDomain()); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpClientCodec.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpClientCodec.java index bd892656c2..15803c2e7e 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpClientCodec.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpClientCodec.java @@ -87,7 +87,6 @@ public class HttpClientCodec implements ChannelUpstreamHandler, private final class Encoder extends HttpRequestEncoder { Encoder() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpCodecUtil.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpCodecUtil.java index b9d47014ff..ae178e6cc8 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpCodecUtil.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpCodecUtil.java @@ -50,7 +50,7 @@ class HttpCodecUtil { /** * carriage return line feed */ - static final byte[] CRLF = new byte[] { CR, LF }; + static final byte[] CRLF = { CR, LF }; /** * Colon ':' @@ -72,7 +72,6 @@ class HttpCodecUtil { static final Charset DEFAULT_CHARSET = CharsetUtil.UTF_8; private HttpCodecUtil() { - super(); } static void validateHeaderName(String name) { diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpContentDecoder.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpContentDecoder.java index a322a71658..569cc2ecbe 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpContentDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpContentDecoder.java @@ -54,7 +54,6 @@ public abstract class HttpContentDecoder extends SimpleChannelUpstreamHandler { * Creates a new instance. */ protected HttpContentDecoder() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpContentEncoder.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpContentEncoder.java index c07855c9b9..a3ff8c662f 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpContentEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpContentEncoder.java @@ -61,7 +61,6 @@ public abstract class HttpContentEncoder extends SimpleChannelHandler { * Creates a new instance. */ protected HttpContentEncoder() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpHeaders.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpHeaders.java index 7e2f2c4b41..3181c89131 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpHeaders.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpHeaders.java @@ -310,7 +310,6 @@ public class HttpHeaders { public static final String WWW_AUTHENTICATE = "WWW-Authenticate"; private Names() { - super(); } } @@ -455,7 +454,6 @@ public class HttpHeaders { public static final String WEBSOCKET = "WebSocket"; private Values() { - super(); } } diff --git a/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageDecoder.java b/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageDecoder.java index 8ed7643337..87cff2b2c0 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/HttpMessageDecoder.java @@ -136,7 +136,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder { enum HttpDataType { - Attribute, FileUpload, InternalAttribute; + Attribute, FileUpload, InternalAttribute } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/http/MixedAttribute.java b/src/main/java/org/jboss/netty/handler/codec/http/MixedAttribute.java index 4bad8f9c03..8a70125c68 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/MixedAttribute.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/MixedAttribute.java @@ -143,9 +143,7 @@ public class MixedAttribute implements Attribute { if (buffer.readableBytes() > limitSize) { if (attribute instanceof MemoryAttribute) { // change to Disk - DiskAttribute diskAttribute = new DiskAttribute(attribute - .getName()); - attribute = diskAttribute; + attribute = new DiskAttribute(attribute.getName()); } } attribute.setContent(buffer); @@ -156,9 +154,7 @@ public class MixedAttribute implements Attribute { if (file.length() > limitSize) { if (attribute instanceof MemoryAttribute) { // change to Disk - DiskAttribute diskAttribute = new DiskAttribute(attribute - .getName()); - attribute = diskAttribute; + attribute = new DiskAttribute(attribute.getName()); } } attribute.setContent(file); @@ -168,9 +164,7 @@ public class MixedAttribute implements Attribute { public void setContent(InputStream inputStream) throws IOException { if (attribute instanceof MemoryAttribute) { // change to Disk even if we don't know the size - DiskAttribute diskAttribute = new DiskAttribute(attribute - .getName()); - attribute = diskAttribute; + attribute = new DiskAttribute(attribute.getName()); } attribute.setContent(inputStream); } diff --git a/src/main/java/org/jboss/netty/handler/codec/http/MixedFileUpload.java b/src/main/java/org/jboss/netty/handler/codec/http/MixedFileUpload.java index 51994ff267..8c7df5e4ed 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/MixedFileUpload.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/MixedFileUpload.java @@ -147,12 +147,11 @@ public class MixedFileUpload implements FileUpload { if (buffer.readableBytes() > limitSize) { if (fileUpload instanceof MemoryFileUpload) { // change to Disk - DiskFileUpload diskFileUpload = new DiskFileUpload(fileUpload + fileUpload = new DiskFileUpload(fileUpload .getName(), fileUpload.getFilename(), fileUpload .getContentType(), fileUpload .getContentTransferEncoding(), fileUpload.getCharset(), definedSize); - fileUpload = diskFileUpload; } } fileUpload.setContent(buffer); @@ -163,12 +162,11 @@ public class MixedFileUpload implements FileUpload { if (file.length() > limitSize) { if (fileUpload instanceof MemoryFileUpload) { // change to Disk - DiskFileUpload diskFileUpload = new DiskFileUpload(fileUpload + fileUpload = new DiskFileUpload(fileUpload .getName(), fileUpload.getFilename(), fileUpload .getContentType(), fileUpload .getContentTransferEncoding(), fileUpload.getCharset(), definedSize); - fileUpload = diskFileUpload; } } fileUpload.setContent(file); @@ -178,12 +176,11 @@ public class MixedFileUpload implements FileUpload { public void setContent(InputStream inputStream) throws IOException { if (fileUpload instanceof MemoryFileUpload) { // change to Disk - DiskFileUpload diskFileUpload = new DiskFileUpload(fileUpload + fileUpload = new DiskFileUpload(fileUpload .getName(), fileUpload.getFilename(), fileUpload .getContentType(), fileUpload .getContentTransferEncoding(), fileUpload.getCharset(), definedSize); - fileUpload = diskFileUpload; } fileUpload.setContent(inputStream); } diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java index d40ea276ff..c362dba8d5 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java @@ -204,7 +204,6 @@ public abstract class WebSocketClientHandshaker { * @return Random number */ protected int createRandomNumber(int min, int max) { - int rand = (int) (Math.random() * max + min); - return rand; + return (int) (Math.random() * max + min); } } diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker00.java b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker00.java index 17515192fc..51f27c4978 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker00.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker00.java @@ -65,7 +65,6 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker { */ public WebSocketClientHandshaker00(URI webSocketURL, WebSocketSpecificationVersion version, String subProtocol) { super(webSocketURL, version, subProtocol); - return; } /** @@ -206,7 +205,6 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker { ctx.getPipeline().replace("decoder", "ws-decoder", new WebSocket00FrameDecoder()); this.setOpenningHandshakeCompleted(true); - return; } private String insertRandomCharacters(String key) { diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker10.java b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker10.java index 87e2100f3d..b68c97fc7f 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker10.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketClientHandshaker10.java @@ -73,7 +73,6 @@ public class WebSocketClientHandshaker10 extends WebSocketClientHandshaker { public WebSocketClientHandshaker10(URI webSocketURL, WebSocketSpecificationVersion version, String subProtocol, boolean allowExtensions) { super(webSocketURL, version, subProtocol); this.allowExtensions = allowExtensions; - return; } /** @@ -134,7 +133,6 @@ public class WebSocketClientHandshaker10 extends WebSocketClientHandshaker { channel.write(request); ctx.getPipeline().replace("encoder", "ws-encoder", new WebSocket08FrameEncoder(true)); - return; } /** @@ -183,7 +181,6 @@ public class WebSocketClientHandshaker10 extends WebSocketClientHandshaker { ctx.getPipeline().replace("decoder", "ws-decoder", new WebSocket08FrameDecoder(false, this.allowExtensions)); this.setOpenningHandshakeCompleted(true); - return; } } diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java index 9d5ccab099..9d8c7a7a5f 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java @@ -61,7 +61,6 @@ public abstract class WebSocketServerHandshaker { this.subProtocolsArray[i] = this.subProtocolsArray[i].trim(); } } - return; } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker00.java b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker00.java index 7426c97b37..ea63380d04 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker00.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker00.java @@ -73,7 +73,6 @@ public class WebSocketServerHandshaker00 extends WebSocketServerHandshaker { */ public WebSocketServerHandshaker00(String webSocketURL, String subProtocols) { super(webSocketURL, subProtocols); - return; } /** @@ -185,7 +184,6 @@ public class WebSocketServerHandshaker00 extends WebSocketServerHandshaker { ctx.getChannel().write(res); p.replace("encoder", "wsencoder", new WebSocket00FrameEncoder()); - return; } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker10.java b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker10.java index 541b4f8489..dbed38ff03 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker10.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshaker10.java @@ -65,7 +65,6 @@ public class WebSocketServerHandshaker10 extends WebSocketServerHandshaker { public WebSocketServerHandshaker10(String webSocketURL, String subProtocols, boolean allowExtensions) { super(webSocketURL, subProtocols); this.allowExtensions = allowExtensions; - return; } /** @@ -148,7 +147,6 @@ public class WebSocketServerHandshaker10 extends WebSocketServerHandshaker { p.replace("decoder", "wsdecoder", new WebSocket08FrameDecoder(true, this.allowExtensions)); p.replace("encoder", "wsencoder", new WebSocket08FrameEncoder(false)); - return; } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshakerFactory.java b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshakerFactory.java index 74ec495f5e..5c33b5989c 100644 --- a/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshakerFactory.java +++ b/src/main/java/org/jboss/netty/handler/codec/http/websocketx/WebSocketServerHandshakerFactory.java @@ -54,7 +54,6 @@ public class WebSocketServerHandshakerFactory { this.webSocketURL = webSocketURL; this.subProtocols = subProtocols; this.allowExtensions = allowExtensions; - return; } /** @@ -91,7 +90,6 @@ public class WebSocketServerHandshakerFactory { res.setStatus(HttpResponseStatus.UPGRADE_REQUIRED); res.setHeader(Names.SEC_WEBSOCKET_VERSION, "8"); ctx.getChannel().write(res); - return; } } diff --git a/src/main/java/org/jboss/netty/handler/codec/oneone/OneToOneDecoder.java b/src/main/java/org/jboss/netty/handler/codec/oneone/OneToOneDecoder.java index 7f44b53fc4..e75a2e40bc 100644 --- a/src/main/java/org/jboss/netty/handler/codec/oneone/OneToOneDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/oneone/OneToOneDecoder.java @@ -57,7 +57,6 @@ public abstract class OneToOneDecoder implements ChannelUpstreamHandler { * Creates a new instance with the current system character set. */ protected OneToOneDecoder() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/oneone/OneToOneEncoder.java b/src/main/java/org/jboss/netty/handler/codec/oneone/OneToOneEncoder.java index b14af9779c..f99d47ba45 100644 --- a/src/main/java/org/jboss/netty/handler/codec/oneone/OneToOneEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/oneone/OneToOneEncoder.java @@ -51,7 +51,6 @@ import org.jboss.netty.handler.codec.frame.Delimiters; public abstract class OneToOneEncoder implements ChannelDownstreamHandler { protected OneToOneEncoder() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoder.java b/src/main/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoder.java index bd67a91336..4befc0d812 100644 --- a/src/main/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoder.java @@ -53,7 +53,6 @@ public class ProtobufVarint32FrameDecoder extends FrameDecoder { * Creates a new instance. */ public ProtobufVarint32FrameDecoder() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrepender.java b/src/main/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrepender.java index eb4600f489..b5d3129fe2 100644 --- a/src/main/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrepender.java +++ b/src/main/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrepender.java @@ -52,7 +52,6 @@ public class ProtobufVarint32LengthFieldPrepender extends OneToOneEncoder { * Creates a new instance. */ public ProtobufVarint32LengthFieldPrepender() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/replay/ReplayingDecoderBuffer.java b/src/main/java/org/jboss/netty/handler/codec/replay/ReplayingDecoderBuffer.java index dfe00bf5f2..7d61665e3f 100644 --- a/src/main/java/org/jboss/netty/handler/codec/replay/ReplayingDecoderBuffer.java +++ b/src/main/java/org/jboss/netty/handler/codec/replay/ReplayingDecoderBuffer.java @@ -363,7 +363,7 @@ class ReplayingDecoderBuffer implements ChannelBuffer { } else { return Integer.MAX_VALUE - buffer.readerIndex(); } - } + } @Override public boolean readBoolean() { diff --git a/src/main/java/org/jboss/netty/handler/codec/replay/UnreplayableOperationException.java b/src/main/java/org/jboss/netty/handler/codec/replay/UnreplayableOperationException.java index 3cbeb4c665..ba547feb6b 100644 --- a/src/main/java/org/jboss/netty/handler/codec/replay/UnreplayableOperationException.java +++ b/src/main/java/org/jboss/netty/handler/codec/replay/UnreplayableOperationException.java @@ -35,7 +35,6 @@ public class UnreplayableOperationException extends * Creates a new instance. */ public UnreplayableOperationException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspHeaders.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspHeaders.java index cb4e3c0c5f..206bd36821 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspHeaders.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspHeaders.java @@ -218,7 +218,6 @@ public final class RtspHeaders { public static final String WWW_AUTHENTICATE = HttpHeaders.Names.WWW_AUTHENTICATE; private Names() { - super(); } } @@ -400,11 +399,9 @@ public final class RtspHeaders { public static final String URL = "url"; protected Values() { - super(); } } private RtspHeaders() { - super(); } } diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageEncoder.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageEncoder.java index 2ebee6f3d9..f9f0020a45 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMessageEncoder.java @@ -40,7 +40,6 @@ public abstract class RtspMessageEncoder extends HttpMessageEncoder { * Creates a new instance. */ protected RtspMessageEncoder() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMethods.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMethods.java index 8437167dc7..3395c87076 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMethods.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspMethods.java @@ -141,6 +141,5 @@ public final class RtspMethods { } private RtspMethods() { - super(); } } diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspRequestDecoder.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspRequestDecoder.java index 2313e44c17..1fae71db12 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspRequestDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspRequestDecoder.java @@ -61,7 +61,6 @@ public class RtspRequestDecoder extends RtspMessageDecoder { * {@code maxContentLength (8192)}. */ public RtspRequestDecoder() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseDecoder.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseDecoder.java index 7f7dd15016..423dd687bb 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseDecoder.java @@ -62,7 +62,6 @@ public class RtspResponseDecoder extends RtspMessageDecoder { * {@code maxContentLength (8192)}. */ public RtspResponseDecoder() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseStatuses.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseStatuses.java index c8d39871fd..208b0c6c57 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseStatuses.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspResponseStatuses.java @@ -295,6 +295,5 @@ public final class RtspResponseStatuses { } private RtspResponseStatuses() { - super(); } } diff --git a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspVersions.java b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspVersions.java index 48e1467cee..2e0180d4e0 100644 --- a/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspVersions.java +++ b/src/main/java/org/jboss/netty/handler/codec/rtsp/RtspVersions.java @@ -54,6 +54,5 @@ public final class RtspVersions { } private RtspVersions() { - super(); } } diff --git a/src/main/java/org/jboss/netty/handler/codec/serialization/CompatibleObjectEncoder.java b/src/main/java/org/jboss/netty/handler/codec/serialization/CompatibleObjectEncoder.java index 6395898b9c..f2399281b1 100644 --- a/src/main/java/org/jboss/netty/handler/codec/serialization/CompatibleObjectEncoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/serialization/CompatibleObjectEncoder.java @@ -98,8 +98,7 @@ public class CompatibleObjectEncoder extends OneToOneEncoder { oout.writeObject(msg); oout.flush(); - ChannelBuffer encoded = buffer.readBytes(buffer.readableBytes()); - return encoded; + return buffer.readBytes(buffer.readableBytes()); } private ChannelBuffer buffer(ChannelHandlerContext ctx) throws Exception { diff --git a/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java b/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java index d7714806c0..ca849d532a 100644 --- a/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/MemoryAwareThreadPoolExecutor.java @@ -500,7 +500,6 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor { private static final class NewThreadRunsPolicy implements RejectedExecutionHandler { NewThreadRunsPolicy() { - super(); } @Override @@ -537,8 +536,7 @@ public class MemoryAwareThreadPoolExecutor extends ThreadPoolExecutor { private int waiters; Limiter(long limit) { - super(); - this.limit = limit; + this.limit = limit; } synchronized void increase(long amount) { diff --git a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java index 52306b76bb..6d03fb029c 100644 --- a/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java +++ b/src/main/java/org/jboss/netty/handler/execution/OrderedMemoryAwareThreadPoolExecutor.java @@ -287,7 +287,6 @@ public class OrderedMemoryAwareThreadPoolExecutor extends private final LinkedList tasks = new LinkedList(); ChildExecutor() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/handler/ipfilter/IpFilterRuleHandler.java b/src/main/java/org/jboss/netty/handler/ipfilter/IpFilterRuleHandler.java index a9c35c5ebb..094af3d256 100644 --- a/src/main/java/org/jboss/netty/handler/ipfilter/IpFilterRuleHandler.java +++ b/src/main/java/org/jboss/netty/handler/ipfilter/IpFilterRuleHandler.java @@ -82,7 +82,6 @@ public class IpFilterRuleHandler extends IpFilteringHandlerImpl */ public IpFilterRuleHandler() { - super(); } // Below are methods directly inspired from CopyOnWriteArrayList methods diff --git a/src/main/java/org/jboss/netty/handler/ipfilter/IpFilterRuleList.java b/src/main/java/org/jboss/netty/handler/ipfilter/IpFilterRuleList.java index 6d2a249633..a75cf92db0 100644 --- a/src/main/java/org/jboss/netty/handler/ipfilter/IpFilterRuleList.java +++ b/src/main/java/org/jboss/netty/handler/ipfilter/IpFilterRuleList.java @@ -59,8 +59,7 @@ public class IpFilterRuleList extends ArrayList */ public IpFilterRuleList(String rules) { - super(); - parseRules(rules); + parseRules(rules); } private void parseRules(String rules) diff --git a/src/main/java/org/jboss/netty/handler/ipfilter/IpFilteringHandlerImpl.java b/src/main/java/org/jboss/netty/handler/ipfilter/IpFilteringHandlerImpl.java index 1768321f1a..b2c8d12fe1 100644 --- a/src/main/java/org/jboss/netty/handler/ipfilter/IpFilteringHandlerImpl.java +++ b/src/main/java/org/jboss/netty/handler/ipfilter/IpFilteringHandlerImpl.java @@ -66,8 +66,7 @@ public abstract class IpFilteringHandlerImpl implements ChannelUpstreamHandler, { if (listener == null) return null; - ChannelFuture result = listener.refused(ctx, e, inetSocketAddress); - return result; + return listener.refused(ctx, e, inetSocketAddress); } protected ChannelFuture handleAllowedChannel(ChannelHandlerContext ctx, ChannelEvent e, @@ -75,8 +74,7 @@ public abstract class IpFilteringHandlerImpl implements ChannelUpstreamHandler, { if (listener == null) return null; - ChannelFuture result = listener.allowed(ctx, e, inetSocketAddress); - return result; + return listener.allowed(ctx, e, inetSocketAddress); } /** diff --git a/src/main/java/org/jboss/netty/handler/ipfilter/IpSubnetFilterRule.java b/src/main/java/org/jboss/netty/handler/ipfilter/IpSubnetFilterRule.java index e197ae1fff..70a82edcdb 100644 --- a/src/main/java/org/jboss/netty/handler/ipfilter/IpSubnetFilterRule.java +++ b/src/main/java/org/jboss/netty/handler/ipfilter/IpSubnetFilterRule.java @@ -39,8 +39,7 @@ public class IpSubnetFilterRule extends IpSubnet implements IpFilterRule */ public IpSubnetFilterRule(boolean allow) { - super(); - isAllowRule = allow; + isAllowRule = allow; } /** diff --git a/src/main/java/org/jboss/netty/handler/ipfilter/IpV4SubnetFilterRule.java b/src/main/java/org/jboss/netty/handler/ipfilter/IpV4SubnetFilterRule.java index 5705d97dcb..7d6f1c3aa6 100644 --- a/src/main/java/org/jboss/netty/handler/ipfilter/IpV4SubnetFilterRule.java +++ b/src/main/java/org/jboss/netty/handler/ipfilter/IpV4SubnetFilterRule.java @@ -36,8 +36,7 @@ public class IpV4SubnetFilterRule extends IpV4Subnet implements IpFilterRule */ public IpV4SubnetFilterRule(boolean allow) { - super(); - isAllowRule = allow; + isAllowRule = allow; } /** diff --git a/src/main/java/org/jboss/netty/handler/queue/BlockingReadTimeoutException.java b/src/main/java/org/jboss/netty/handler/queue/BlockingReadTimeoutException.java index 04d4b7ba84..d265e41a45 100644 --- a/src/main/java/org/jboss/netty/handler/queue/BlockingReadTimeoutException.java +++ b/src/main/java/org/jboss/netty/handler/queue/BlockingReadTimeoutException.java @@ -34,7 +34,6 @@ public class BlockingReadTimeoutException extends InterruptedIOException { * Creates a new instance. */ public BlockingReadTimeoutException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/timeout/IdleState.java b/src/main/java/org/jboss/netty/handler/timeout/IdleState.java index f33f11b9fe..da828033db 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/IdleState.java +++ b/src/main/java/org/jboss/netty/handler/timeout/IdleState.java @@ -37,5 +37,5 @@ public enum IdleState { /** * No data was either received or sent for a while. */ - ALL_IDLE; + ALL_IDLE } diff --git a/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java b/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java index 705a0bf1d0..6392949450 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java +++ b/src/main/java/org/jboss/netty/handler/timeout/IdleStateHandler.java @@ -443,7 +443,6 @@ public class IdleStateHandler extends SimpleChannelUpstreamHandler private static final class State { State() { - super(); } volatile Timeout readerIdleTimeout; diff --git a/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutException.java b/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutException.java index fc8d0d4f95..6cf2f5152f 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutException.java +++ b/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutException.java @@ -31,7 +31,6 @@ public class ReadTimeoutException extends TimeoutException { * Creates a new instance. */ public ReadTimeoutException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java b/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java index 7b1d962c0c..486b0f22c2 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java +++ b/src/main/java/org/jboss/netty/handler/timeout/ReadTimeoutHandler.java @@ -259,7 +259,6 @@ public class ReadTimeoutHandler extends SimpleChannelUpstreamHandler volatile long lastReadTime = System.currentTimeMillis(); State() { - super(); } } } diff --git a/src/main/java/org/jboss/netty/handler/timeout/TimeoutException.java b/src/main/java/org/jboss/netty/handler/timeout/TimeoutException.java index 69410b8c79..82dfb2f884 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/TimeoutException.java +++ b/src/main/java/org/jboss/netty/handler/timeout/TimeoutException.java @@ -33,7 +33,6 @@ public class TimeoutException extends ChannelException { * Creates a new instance. */ public TimeoutException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutException.java b/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutException.java index de81778cee..9bdf89f20c 100644 --- a/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutException.java +++ b/src/main/java/org/jboss/netty/handler/timeout/WriteTimeoutException.java @@ -32,7 +32,6 @@ public class WriteTimeoutException extends TimeoutException { * Creates a new instance. */ public WriteTimeoutException() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/handler/traffic/AbstractTrafficShapingHandler.java b/src/main/java/org/jboss/netty/handler/traffic/AbstractTrafficShapingHandler.java index 6f4f4aaf52..f22439f2ca 100644 --- a/src/main/java/org/jboss/netty/handler/traffic/AbstractTrafficShapingHandler.java +++ b/src/main/java/org/jboss/netty/handler/traffic/AbstractTrafficShapingHandler.java @@ -154,8 +154,7 @@ public abstract class AbstractTrafficShapingHandler extends */ public AbstractTrafficShapingHandler(Executor executor, long writeLimit, long readLimit, long checkInterval) { - super(); - init(new DefaultObjectSizeEstimator(), executor, writeLimit, readLimit, + init(new DefaultObjectSizeEstimator(), executor, writeLimit, readLimit, checkInterval); } @@ -178,8 +177,7 @@ public abstract class AbstractTrafficShapingHandler extends public AbstractTrafficShapingHandler( ObjectSizeEstimator objectSizeEstimator, Executor executor, long writeLimit, long readLimit, long checkInterval) { - super(); - init(objectSizeEstimator, executor, writeLimit, readLimit, + init(objectSizeEstimator, executor, writeLimit, readLimit, checkInterval); } @@ -195,8 +193,7 @@ public abstract class AbstractTrafficShapingHandler extends */ public AbstractTrafficShapingHandler(Executor executor, long writeLimit, long readLimit) { - super(); - init(new DefaultObjectSizeEstimator(), executor, writeLimit, readLimit, + init(new DefaultObjectSizeEstimator(), executor, writeLimit, readLimit, DEFAULT_CHECK_INTERVAL); } @@ -216,8 +213,7 @@ public abstract class AbstractTrafficShapingHandler extends public AbstractTrafficShapingHandler( ObjectSizeEstimator objectSizeEstimator, Executor executor, long writeLimit, long readLimit) { - super(); - init(objectSizeEstimator, executor, writeLimit, readLimit, + init(objectSizeEstimator, executor, writeLimit, readLimit, DEFAULT_CHECK_INTERVAL); } @@ -228,8 +224,7 @@ public abstract class AbstractTrafficShapingHandler extends * created for instance like Executors.newCachedThreadPool */ public AbstractTrafficShapingHandler(Executor executor) { - super(); - init(new DefaultObjectSizeEstimator(), executor, 0, 0, + init(new DefaultObjectSizeEstimator(), executor, 0, 0, DEFAULT_CHECK_INTERVAL); } @@ -244,8 +239,7 @@ public abstract class AbstractTrafficShapingHandler extends */ public AbstractTrafficShapingHandler( ObjectSizeEstimator objectSizeEstimator, Executor executor) { - super(); - init(objectSizeEstimator, executor, 0, 0, DEFAULT_CHECK_INTERVAL); + init(objectSizeEstimator, executor, 0, 0, DEFAULT_CHECK_INTERVAL); } /** @@ -258,8 +252,7 @@ public abstract class AbstractTrafficShapingHandler extends * channels or 0 if no stats are to be computed */ public AbstractTrafficShapingHandler(Executor executor, long checkInterval) { - super(); - init(new DefaultObjectSizeEstimator(), executor, 0, 0, checkInterval); + init(new DefaultObjectSizeEstimator(), executor, 0, 0, checkInterval); } /** @@ -277,8 +270,7 @@ public abstract class AbstractTrafficShapingHandler extends public AbstractTrafficShapingHandler( ObjectSizeEstimator objectSizeEstimator, Executor executor, long checkInterval) { - super(); - init(objectSizeEstimator, executor, 0, 0, checkInterval); + init(objectSizeEstimator, executor, 0, 0, checkInterval); } /** @@ -393,8 +385,7 @@ public abstract class AbstractTrafficShapingHandler extends // Time is too short, so just lets continue return 0; } - long wait = bytes * 1000 / limit - interval; - return wait; + return bytes * 1000 / limit - interval; } @Override diff --git a/src/main/java/org/jboss/netty/logging/AbstractInternalLogger.java b/src/main/java/org/jboss/netty/logging/AbstractInternalLogger.java index 02437e1c15..84d6bb27d7 100644 --- a/src/main/java/org/jboss/netty/logging/AbstractInternalLogger.java +++ b/src/main/java/org/jboss/netty/logging/AbstractInternalLogger.java @@ -30,7 +30,6 @@ public abstract class AbstractInternalLogger implements InternalLogger { * Creates a new instance. */ protected AbstractInternalLogger() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/logging/InternalLogLevel.java b/src/main/java/org/jboss/netty/logging/InternalLogLevel.java index 8f054037c3..ff08b8461f 100644 --- a/src/main/java/org/jboss/netty/logging/InternalLogLevel.java +++ b/src/main/java/org/jboss/netty/logging/InternalLogLevel.java @@ -38,5 +38,5 @@ public enum InternalLogLevel { /** * 'ERROR' log level. */ - ERROR; + ERROR } diff --git a/src/main/java/org/jboss/netty/util/ExternalResourceUtil.java b/src/main/java/org/jboss/netty/util/ExternalResourceUtil.java index 1bbf823f19..cf154b7fad 100644 --- a/src/main/java/org/jboss/netty/util/ExternalResourceUtil.java +++ b/src/main/java/org/jboss/netty/util/ExternalResourceUtil.java @@ -45,6 +45,5 @@ public class ExternalResourceUtil { } private ExternalResourceUtil() { - super(); } } diff --git a/src/main/java/org/jboss/netty/util/HashedWheelTimer.java b/src/main/java/org/jboss/netty/util/HashedWheelTimer.java index 7c5f8114e8..53d056c65f 100644 --- a/src/main/java/org/jboss/netty/util/HashedWheelTimer.java +++ b/src/main/java/org/jboss/netty/util/HashedWheelTimer.java @@ -362,7 +362,6 @@ public class HashedWheelTimer implements Timer { private long tick; Worker() { - super(); } @Override diff --git a/src/main/java/org/jboss/netty/util/internal/DeadLockProofWorker.java b/src/main/java/org/jboss/netty/util/internal/DeadLockProofWorker.java index 1fc3f6ac3f..48593af238 100644 --- a/src/main/java/org/jboss/netty/util/internal/DeadLockProofWorker.java +++ b/src/main/java/org/jboss/netty/util/internal/DeadLockProofWorker.java @@ -51,6 +51,5 @@ public final class DeadLockProofWorker { } private DeadLockProofWorker() { - super(); } } diff --git a/src/main/java/org/jboss/netty/util/internal/ExecutorUtil.java b/src/main/java/org/jboss/netty/util/internal/ExecutorUtil.java index 08409b7f22..b6355fcfba 100644 --- a/src/main/java/org/jboss/netty/util/internal/ExecutorUtil.java +++ b/src/main/java/org/jboss/netty/util/internal/ExecutorUtil.java @@ -119,6 +119,5 @@ public class ExecutorUtil { } private ExecutorUtil() { - super(); } } diff --git a/src/main/java/org/jboss/netty/util/internal/LinkedTransferQueue.java b/src/main/java/org/jboss/netty/util/internal/LinkedTransferQueue.java index 41d645e420..57149985ca 100644 --- a/src/main/java/org/jboss/netty/util/internal/LinkedTransferQueue.java +++ b/src/main/java/org/jboss/netty/util/internal/LinkedTransferQueue.java @@ -653,7 +653,7 @@ public class LinkedTransferQueue extends AbstractQueue } } LockSupport.unpark(p.waiter); - return LinkedTransferQueue.cast(item); + return LinkedTransferQueue.cast(item); } } Node n = p.next; @@ -737,7 +737,7 @@ public class LinkedTransferQueue extends AbstractQueue if (item != e) { // matched // assert item != s; s.forgetContents(); // avoid garbage - return LinkedTransferQueue.cast(item); + return LinkedTransferQueue.cast(item); } if ((w.isInterrupted() || timed && nanos <= 0) && s.casItem(e, s)) { // cancel @@ -825,7 +825,7 @@ public class LinkedTransferQueue extends AbstractQueue Object item = p.item; if (p.isData) { if (item != null && item != p) { - return LinkedTransferQueue.cast(item); + return LinkedTransferQueue.cast(item); } } else if (item == null) { @@ -878,7 +878,7 @@ public class LinkedTransferQueue extends AbstractQueue Object item = p.item; if (p.isData) { if (item != null && item != p) { - nextItem = LinkedTransferQueue.cast(item); + nextItem = LinkedTransferQueue.cast(item); nextNode = p; return; } @@ -1031,7 +1031,6 @@ public class LinkedTransferQueue extends AbstractQueue * Creates an initially empty {@code LinkedTransferQueue}. */ public LinkedTransferQueue() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/util/internal/ThreadLocalRandom.java b/src/main/java/org/jboss/netty/util/internal/ThreadLocalRandom.java index 10832d306b..67529f3d20 100644 --- a/src/main/java/org/jboss/netty/util/internal/ThreadLocalRandom.java +++ b/src/main/java/org/jboss/netty/util/internal/ThreadLocalRandom.java @@ -90,7 +90,6 @@ final class ThreadLocalRandom extends Random { * invokes setSeed exactly once to initialize. */ ThreadLocalRandom() { - super(); } /** diff --git a/src/main/java/org/jboss/netty/util/internal/jzlib/Deflate.java b/src/main/java/org/jboss/netty/util/internal/jzlib/Deflate.java index 62eedc8a50..d463eb54e8 100644 --- a/src/main/java/org/jboss/netty/util/internal/jzlib/Deflate.java +++ b/src/main/java/org/jboss/netty/util/internal/jzlib/Deflate.java @@ -519,18 +519,16 @@ final class Deflate { } private void send_bits(int value, int length) { - int len = length; - if (bi_valid > Buf_size - len) { - int val = value; + if (bi_valid > Buf_size - length) { // bi_buf |= (val << bi_valid); - bi_buf |= val << bi_valid & 0xffff; + bi_buf |= value << bi_valid & 0xffff; put_short(bi_buf); - bi_buf = (short) (val >>> Buf_size - bi_valid); - bi_valid += len - Buf_size; + bi_buf = (short) (value >>> Buf_size - bi_valid); + bi_valid += length - Buf_size; } else { // bi_buf |= (value) << bi_valid; bi_buf |= value << bi_valid & 0xffff; - bi_valid += len; + bi_valid += length; } } diff --git a/src/main/java/org/jboss/netty/util/internal/jzlib/JZlib.java b/src/main/java/org/jboss/netty/util/internal/jzlib/JZlib.java index 7e7704064e..228b9ff425 100644 --- a/src/main/java/org/jboss/netty/util/internal/jzlib/JZlib.java +++ b/src/main/java/org/jboss/netty/util/internal/jzlib/JZlib.java @@ -104,6 +104,6 @@ public final class JZlib { static final int MAX_BL_BITS = 7; enum WrapperType { - NONE, ZLIB, GZIP, ZLIB_OR_NONE; + NONE, ZLIB, GZIP, ZLIB_OR_NONE } } diff --git a/src/test/java/org/jboss/netty/bootstrap/AbstractSocketServerBootstrapTest.java b/src/test/java/org/jboss/netty/bootstrap/AbstractSocketServerBootstrapTest.java index 3740903678..3d7a5845b5 100644 --- a/src/test/java/org/jboss/netty/bootstrap/AbstractSocketServerBootstrapTest.java +++ b/src/test/java/org/jboss/netty/bootstrap/AbstractSocketServerBootstrapTest.java @@ -207,7 +207,6 @@ public abstract class AbstractSocketServerBootstrapTest { final StringBuffer result = new StringBuffer(); ParentChannelHandler() { - super(); } @Override diff --git a/src/test/java/org/jboss/netty/buffer/ChannelBuffersTest.java b/src/test/java/org/jboss/netty/buffer/ChannelBuffersTest.java index 81a649e93b..c03d13df0b 100644 --- a/src/test/java/org/jboss/netty/buffer/ChannelBuffersTest.java +++ b/src/test/java/org/jboss/netty/buffer/ChannelBuffersTest.java @@ -177,10 +177,10 @@ public class ChannelBuffersTest { assertSame(EMPTY_BUFFER, wrappedBuffer(new byte[][] { new byte[0] })); assertSame(EMPTY_BUFFER, wrappedBuffer(new ByteBuffer[0])); assertSame(EMPTY_BUFFER, wrappedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0) })); - assertSame(EMPTY_BUFFER, wrappedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0), ByteBuffer.allocate(0) })); + assertSame(EMPTY_BUFFER, wrappedBuffer(ByteBuffer.allocate(0), ByteBuffer.allocate(0))); assertSame(EMPTY_BUFFER, wrappedBuffer(new ChannelBuffer[0])); assertSame(EMPTY_BUFFER, wrappedBuffer(new ChannelBuffer[] { buffer(0) })); - assertSame(EMPTY_BUFFER, wrappedBuffer(new ChannelBuffer[] { buffer(0), buffer(0) })); + assertSame(EMPTY_BUFFER, wrappedBuffer(buffer(0), buffer(0))); assertSame(EMPTY_BUFFER, copiedBuffer(new byte[0])); assertSame(EMPTY_BUFFER, copiedBuffer(LITTLE_ENDIAN, new byte[0])); @@ -194,10 +194,10 @@ public class ChannelBuffersTest { assertSame(EMPTY_BUFFER, copiedBuffer(new byte[][] { new byte[0] })); assertSame(EMPTY_BUFFER, copiedBuffer(new ByteBuffer[0])); assertSame(EMPTY_BUFFER, copiedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0) })); - assertSame(EMPTY_BUFFER, copiedBuffer(new ByteBuffer[] { ByteBuffer.allocate(0), ByteBuffer.allocate(0) })); + assertSame(EMPTY_BUFFER, copiedBuffer(ByteBuffer.allocate(0), ByteBuffer.allocate(0))); assertSame(EMPTY_BUFFER, copiedBuffer(new ChannelBuffer[0])); assertSame(EMPTY_BUFFER, copiedBuffer(new ChannelBuffer[] { buffer(0) })); - assertSame(EMPTY_BUFFER, copiedBuffer(new ChannelBuffer[] { buffer(0), buffer(0) })); + assertSame(EMPTY_BUFFER, copiedBuffer(buffer(0), buffer(0))); } @Test diff --git a/src/test/java/org/jboss/netty/buffer/ReadOnlyChannelBufferTest.java b/src/test/java/org/jboss/netty/buffer/ReadOnlyChannelBufferTest.java index 7c89e8d09f..59718fa0e2 100644 --- a/src/test/java/org/jboss/netty/buffer/ReadOnlyChannelBufferTest.java +++ b/src/test/java/org/jboss/netty/buffer/ReadOnlyChannelBufferTest.java @@ -93,7 +93,7 @@ public class ReadOnlyChannelBufferTest { expect(buf.getLong(21)).andReturn(22L); ByteBuffer bb = ByteBuffer.allocate(100); - ByteBuffer[] bbs = new ByteBuffer[] { ByteBuffer.allocate(101), ByteBuffer.allocate(102) }; + ByteBuffer[] bbs = { ByteBuffer.allocate(101), ByteBuffer.allocate(102) }; expect(buf.toByteBuffer(23, 24)).andReturn(bb); expect(buf.toByteBuffers(25, 26)).andReturn(bbs); diff --git a/src/test/java/org/jboss/netty/channel/CompleteChannelFutureTest.java b/src/test/java/org/jboss/netty/channel/CompleteChannelFutureTest.java index 7ac070df28..b94082f075 100644 --- a/src/test/java/org/jboss/netty/channel/CompleteChannelFutureTest.java +++ b/src/test/java/org/jboss/netty/channel/CompleteChannelFutureTest.java @@ -113,7 +113,6 @@ public class CompleteChannelFutureTest { private static final long serialVersionUID = 7059276744882005047L; ExpectedError() { - super(); } } } diff --git a/src/test/java/org/jboss/netty/channel/socket/AbstractSocketEchoTest.java b/src/test/java/org/jboss/netty/channel/socket/AbstractSocketEchoTest.java index da0040889f..0a5427a0ae 100644 --- a/src/test/java/org/jboss/netty/channel/socket/AbstractSocketEchoTest.java +++ b/src/test/java/org/jboss/netty/channel/socket/AbstractSocketEchoTest.java @@ -153,7 +153,6 @@ public abstract class AbstractSocketEchoTest { volatile int counter; EchoHandler() { - super(); } @Override diff --git a/src/test/java/org/jboss/netty/channel/socket/NioServerSocketShutdownTimeTest.java b/src/test/java/org/jboss/netty/channel/socket/NioServerSocketShutdownTimeTest.java index ddfb487d38..0b0338f762 100644 --- a/src/test/java/org/jboss/netty/channel/socket/NioServerSocketShutdownTimeTest.java +++ b/src/test/java/org/jboss/netty/channel/socket/NioServerSocketShutdownTimeTest.java @@ -97,7 +97,6 @@ public class NioServerSocketShutdownTimeTest { volatile boolean closed; DummyHandler() { - super(); } @Override diff --git a/src/test/java/org/jboss/netty/channel/socket/http/HttpTunnelServerChannelSinkTest.java b/src/test/java/org/jboss/netty/channel/socket/http/HttpTunnelServerChannelSinkTest.java index 57b0030703..7c949cf6a8 100644 --- a/src/test/java/org/jboss/netty/channel/socket/http/HttpTunnelServerChannelSinkTest.java +++ b/src/test/java/org/jboss/netty/channel/socket/http/HttpTunnelServerChannelSinkTest.java @@ -83,9 +83,8 @@ public class HttpTunnelServerChannelSinkTest { } }); - ChannelFuture virtualFuture1 = Channels.close(channel); + ChannelFuture virtualFuture = Channels.close(channel); mockContext.assertIsSatisfied(); - ChannelFuture virtualFuture = virtualFuture1; realFuture.setSuccess(); assertTrue(virtualFuture.isSuccess()); } @@ -140,14 +139,12 @@ public class HttpTunnelServerChannelSinkTest { } }); - ChannelFuture virtualFuture = Channels.bind(channel, toAddress); - return virtualFuture; + return Channels.bind(channel, toAddress); } private final class ExceptionCatcher extends SimpleChannelUpstreamHandler { ExceptionCatcher() { - super(); } @Override diff --git a/src/test/java/org/jboss/netty/channel/socket/http/HttpTunnelSoakTester.java b/src/test/java/org/jboss/netty/channel/socket/http/HttpTunnelSoakTester.java index 70c56338da..14d45f2494 100644 --- a/src/test/java/org/jboss/netty/channel/socket/http/HttpTunnelSoakTester.java +++ b/src/test/java/org/jboss/netty/channel/socket/http/HttpTunnelSoakTester.java @@ -345,7 +345,6 @@ public class HttpTunnelSoakTester { if (verifiedBytes >= BYTES_TO_SEND) { completionLatch.countDown(); - return; } } diff --git a/src/test/java/org/jboss/netty/handler/codec/frame/AbstractSocketFixedLengthEchoTest.java b/src/test/java/org/jboss/netty/handler/codec/frame/AbstractSocketFixedLengthEchoTest.java index cca5dfd8f5..24cd4b148a 100644 --- a/src/test/java/org/jboss/netty/handler/codec/frame/AbstractSocketFixedLengthEchoTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/frame/AbstractSocketFixedLengthEchoTest.java @@ -155,7 +155,6 @@ public abstract class AbstractSocketFixedLengthEchoTest { volatile int counter; EchoHandler() { - super(); } @Override diff --git a/src/test/java/org/jboss/netty/handler/codec/http/QueryStringDecoderTest.java b/src/test/java/org/jboss/netty/handler/codec/http/QueryStringDecoderTest.java index de9a6f2c64..07a2bd3f1d 100644 --- a/src/test/java/org/jboss/netty/handler/codec/http/QueryStringDecoderTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/http/QueryStringDecoderTest.java @@ -106,7 +106,7 @@ public class QueryStringDecoderTest { // not rely on the platform's default encoding (not portable). new byte[] {'C', 'a', 'f', 'f', (byte) 0xC3, (byte) 0xA9}, "UTF-8"); - final String[] tests = new String[] { + final String[] tests = { // Encoded -> Decoded or error message substring "", "", "foo", "foo", diff --git a/src/test/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoderTest.java b/src/test/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoderTest.java index 7b09815288..51f4f3cf46 100644 --- a/src/test/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoderTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32FrameDecoderTest.java @@ -42,7 +42,7 @@ public class ProtobufVarint32FrameDecoderTest { @Test public void testTinyDecode() { - byte[] b = new byte[] { 4, 1, 1, 1, 1 }; + byte[] b = { 4, 1, 1, 1, 1 }; embedder.offer(wrappedBuffer(b, 0, 1)); assertThat(embedder.poll(), is(nullValue())); embedder.offer(wrappedBuffer(b, 1, 2)); diff --git a/src/test/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrependerTest.java b/src/test/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrependerTest.java index 9ff660d3b8..a1c8f488eb 100644 --- a/src/test/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrependerTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/protobuf/ProtobufVarint32LengthFieldPrependerTest.java @@ -41,7 +41,7 @@ public class ProtobufVarint32LengthFieldPrependerTest { @Test public void testTinyEncode() { - byte[] b = new byte[] { 4, 1, 1, 1, 1 }; + byte[] b = { 4, 1, 1, 1, 1 }; embedder.offer(wrappedBuffer(b, 1, b.length - 1)); assertThat(embedder.poll(), is(wrappedBuffer(b))); } diff --git a/src/test/java/org/jboss/netty/handler/codec/replay/ReplayingDecoderTest.java b/src/test/java/org/jboss/netty/handler/codec/replay/ReplayingDecoderTest.java index e18ed74c40..17ca8dba51 100644 --- a/src/test/java/org/jboss/netty/handler/codec/replay/ReplayingDecoderTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/replay/ReplayingDecoderTest.java @@ -57,7 +57,6 @@ public class ReplayingDecoderTest { private static final class LineDecoder extends ReplayingDecoder { LineDecoder() { - super(); } @Override diff --git a/src/test/java/org/jboss/netty/handler/codec/serialization/AbstractSocketCompatibleObjectStreamEchoTest.java b/src/test/java/org/jboss/netty/handler/codec/serialization/AbstractSocketCompatibleObjectStreamEchoTest.java index 0aa8717dbf..cf987f4873 100644 --- a/src/test/java/org/jboss/netty/handler/codec/serialization/AbstractSocketCompatibleObjectStreamEchoTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/serialization/AbstractSocketCompatibleObjectStreamEchoTest.java @@ -163,7 +163,6 @@ public abstract class AbstractSocketCompatibleObjectStreamEchoTest { volatile int counter; EchoHandler() { - super(); } @Override diff --git a/src/test/java/org/jboss/netty/handler/codec/serialization/AbstractSocketObjectStreamEchoTest.java b/src/test/java/org/jboss/netty/handler/codec/serialization/AbstractSocketObjectStreamEchoTest.java index 32c511d1b2..9260c861b9 100644 --- a/src/test/java/org/jboss/netty/handler/codec/serialization/AbstractSocketObjectStreamEchoTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/serialization/AbstractSocketObjectStreamEchoTest.java @@ -162,7 +162,6 @@ public abstract class AbstractSocketObjectStreamEchoTest { volatile int counter; EchoHandler() { - super(); } @Override diff --git a/src/test/java/org/jboss/netty/handler/codec/string/AbstractSocketStringEchoTest.java b/src/test/java/org/jboss/netty/handler/codec/string/AbstractSocketStringEchoTest.java index 786200804a..a8c2c319e0 100644 --- a/src/test/java/org/jboss/netty/handler/codec/string/AbstractSocketStringEchoTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/string/AbstractSocketStringEchoTest.java @@ -168,7 +168,6 @@ public abstract class AbstractSocketStringEchoTest { volatile int counter; EchoHandler() { - super(); } @Override