From a5a19efb4b360c8daec2489aadb214745641eeba Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Sat, 10 Nov 2012 02:27:33 +0900 Subject: [PATCH] Remove unnecessary this, parenthesis, and semicolons --- common/src/main/java/io/netty/monitor/MonitorName.java | 8 ++++---- .../main/java/io/netty/monitor/spi/MonitorProvider.java | 2 +- .../example/http/upload/HttpUploadServerHandler.java | 2 +- .../sslserver/WebSocketSslServerSslContext.java | 5 +++-- .../src/main/java/com/sun/nio/sctp/HandlerResult.java | 2 +- .../io/netty/channel/socket/aio/AioSocketChannel.java | 6 +++--- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/common/src/main/java/io/netty/monitor/MonitorName.java b/common/src/main/java/io/netty/monitor/MonitorName.java index 1f7a5d00ef..ec8fb1520a 100644 --- a/common/src/main/java/io/netty/monitor/MonitorName.java +++ b/common/src/main/java/io/netty/monitor/MonitorName.java @@ -193,10 +193,10 @@ public final class MonitorName { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((group == null) ? 0 : group.hashCode()); - result = prime * result + ((instance == null) ? 0 : instance.hashCode()); - result = prime * result + ((name == null) ? 0 : name.hashCode()); - result = prime * result + ((type == null) ? 0 : type.hashCode()); + result = prime * result + (group == null ? 0 : group.hashCode()); + result = prime * result + (instance == null ? 0 : instance.hashCode()); + result = prime * result + (name == null ? 0 : name.hashCode()); + result = prime * result + (type == null ? 0 : type.hashCode()); return result; } diff --git a/common/src/main/java/io/netty/monitor/spi/MonitorProvider.java b/common/src/main/java/io/netty/monitor/spi/MonitorProvider.java index 64c7489282..a0983a5657 100644 --- a/common/src/main/java/io/netty/monitor/spi/MonitorProvider.java +++ b/common/src/main/java/io/netty/monitor/spi/MonitorProvider.java @@ -73,7 +73,7 @@ public final class MonitorProvider implements Serializable, ComparableTrustin Lee */ public enum HandlerResult { - CONTINUE, RETURN; + CONTINUE, RETURN } diff --git a/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java b/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java index 5a726cf1cd..c8c79066a4 100755 --- a/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/aio/AioSocketChannel.java @@ -245,7 +245,7 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne if (buf.hasNioBuffers()) { ByteBuffer[] buffers = buf.nioBuffers(buf.readerIndex(), buf.readableBytes()); javaChannel().write(buffers, 0, buffers.length, config.getReadTimeout(), - TimeUnit.MILLISECONDS, AioSocketChannel.this, GATHERING_WRITE_HANDLER); + TimeUnit.MILLISECONDS, this, GATHERING_WRITE_HANDLER); } else { javaChannel().write(buf.nioBuffer(), config.getReadTimeout(), TimeUnit.MILLISECONDS, this, WRITE_HANDLER); @@ -276,12 +276,12 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne if (byteBuf.hasNioBuffers()) { ByteBuffer[] buffers = byteBuf.nioBuffers(byteBuf.writerIndex(), byteBuf.writableBytes()); javaChannel().read(buffers, 0, buffers.length, config.getWriteTimeout(), - TimeUnit.MILLISECONDS, AioSocketChannel.this, SCATTERING_READ_HANDLER); + TimeUnit.MILLISECONDS, this, SCATTERING_READ_HANDLER); } else { // Get a ByteBuffer view on the ByteBuf ByteBuffer buffer = byteBuf.nioBuffer(byteBuf.writerIndex(), byteBuf.writableBytes()); javaChannel().read(buffer, config.getWriteTimeout(), TimeUnit.MILLISECONDS, - AioSocketChannel.this, READ_HANDLER); + this, READ_HANDLER); } }