Remove unnecessary this, parenthesis, and semicolons
This commit is contained in:
parent
a9cfde97f0
commit
a5a19efb4b
@ -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;
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public final class MonitorProvider implements Serializable, Comparable<MonitorPr
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||
result = prime * result + (name == null ? 0 : name.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class HttpUploadServerHandler extends ChannelInboundMessageHandlerAdapter
|
||||
if (decoder != null) {
|
||||
decoder.cleanFiles();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void messageReceived(ChannelHandlerContext ctx, Object msg) throws Exception {
|
||||
|
@ -54,6 +54,7 @@ public final class WebSocketSslServerSslContext {
|
||||
* Constructor for singleton
|
||||
*/
|
||||
private WebSocketSslServerSslContext() {
|
||||
SSLContext serverContext = null;
|
||||
try {
|
||||
// Key store (Server side certificate)
|
||||
String algorithm = Security.getProperty("ssl.KeyManagerFactory.algorithm");
|
||||
@ -61,7 +62,6 @@ public final class WebSocketSslServerSslContext {
|
||||
algorithm = "SunX509";
|
||||
}
|
||||
|
||||
SSLContext serverContext;
|
||||
try {
|
||||
String keyStoreFilePath = System.getProperty("keystore.file.path");
|
||||
String keyStoreFilePassword = System.getProperty("keystore.file.password");
|
||||
@ -82,13 +82,14 @@ public final class WebSocketSslServerSslContext {
|
||||
} catch (Exception e) {
|
||||
throw new Error("Failed to initialize the server-side SSLContext", e);
|
||||
}
|
||||
_serverContext = serverContext;
|
||||
} catch (Exception ex) {
|
||||
if (logger.isErrorEnabled()) {
|
||||
logger.error("Error initializing SslContextManager. " + ex.getMessage(), ex);
|
||||
}
|
||||
System.exit(1);
|
||||
|
||||
} finally {
|
||||
_serverContext = serverContext;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,5 +21,5 @@ package com.sun.nio.sctp;
|
||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||
*/
|
||||
public enum HandlerResult {
|
||||
CONTINUE, RETURN;
|
||||
CONTINUE, RETURN
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user