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() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
result = prime * result + ((group == null) ? 0 : group.hashCode());
|
result = prime * result + (group == null ? 0 : group.hashCode());
|
||||||
result = prime * result + ((instance == null) ? 0 : instance.hashCode());
|
result = prime * result + (instance == null ? 0 : instance.hashCode());
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
result = prime * result + (name == null ? 0 : name.hashCode());
|
||||||
result = prime * result + ((type == null) ? 0 : type.hashCode());
|
result = prime * result + (type == null ? 0 : type.hashCode());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public final class MonitorProvider implements Serializable, Comparable<MonitorPr
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
result = prime * result + (name == null ? 0 : name.hashCode());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public class HttpUploadServerHandler extends ChannelInboundMessageHandlerAdapter
|
|||||||
if (decoder != null) {
|
if (decoder != null) {
|
||||||
decoder.cleanFiles();
|
decoder.cleanFiles();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void messageReceived(ChannelHandlerContext ctx, Object msg) throws Exception {
|
public void messageReceived(ChannelHandlerContext ctx, Object msg) throws Exception {
|
||||||
|
@ -54,6 +54,7 @@ public final class WebSocketSslServerSslContext {
|
|||||||
* Constructor for singleton
|
* Constructor for singleton
|
||||||
*/
|
*/
|
||||||
private WebSocketSslServerSslContext() {
|
private WebSocketSslServerSslContext() {
|
||||||
|
SSLContext serverContext = null;
|
||||||
try {
|
try {
|
||||||
// Key store (Server side certificate)
|
// Key store (Server side certificate)
|
||||||
String algorithm = Security.getProperty("ssl.KeyManagerFactory.algorithm");
|
String algorithm = Security.getProperty("ssl.KeyManagerFactory.algorithm");
|
||||||
@ -61,7 +62,6 @@ public final class WebSocketSslServerSslContext {
|
|||||||
algorithm = "SunX509";
|
algorithm = "SunX509";
|
||||||
}
|
}
|
||||||
|
|
||||||
SSLContext serverContext;
|
|
||||||
try {
|
try {
|
||||||
String keyStoreFilePath = System.getProperty("keystore.file.path");
|
String keyStoreFilePath = System.getProperty("keystore.file.path");
|
||||||
String keyStoreFilePassword = System.getProperty("keystore.file.password");
|
String keyStoreFilePassword = System.getProperty("keystore.file.password");
|
||||||
@ -82,13 +82,14 @@ public final class WebSocketSslServerSslContext {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new Error("Failed to initialize the server-side SSLContext", e);
|
throw new Error("Failed to initialize the server-side SSLContext", e);
|
||||||
}
|
}
|
||||||
_serverContext = serverContext;
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
if (logger.isErrorEnabled()) {
|
if (logger.isErrorEnabled()) {
|
||||||
logger.error("Error initializing SslContextManager. " + ex.getMessage(), ex);
|
logger.error("Error initializing SslContextManager. " + ex.getMessage(), ex);
|
||||||
}
|
}
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
_serverContext = serverContext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,5 +21,5 @@ package com.sun.nio.sctp;
|
|||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
*/
|
*/
|
||||||
public enum HandlerResult {
|
public enum HandlerResult {
|
||||||
CONTINUE, RETURN;
|
CONTINUE, RETURN
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
|
|||||||
if (buf.hasNioBuffers()) {
|
if (buf.hasNioBuffers()) {
|
||||||
ByteBuffer[] buffers = buf.nioBuffers(buf.readerIndex(), buf.readableBytes());
|
ByteBuffer[] buffers = buf.nioBuffers(buf.readerIndex(), buf.readableBytes());
|
||||||
javaChannel().write(buffers, 0, buffers.length, config.getReadTimeout(),
|
javaChannel().write(buffers, 0, buffers.length, config.getReadTimeout(),
|
||||||
TimeUnit.MILLISECONDS, AioSocketChannel.this, GATHERING_WRITE_HANDLER);
|
TimeUnit.MILLISECONDS, this, GATHERING_WRITE_HANDLER);
|
||||||
} else {
|
} else {
|
||||||
javaChannel().write(buf.nioBuffer(), config.getReadTimeout(), TimeUnit.MILLISECONDS,
|
javaChannel().write(buf.nioBuffer(), config.getReadTimeout(), TimeUnit.MILLISECONDS,
|
||||||
this, WRITE_HANDLER);
|
this, WRITE_HANDLER);
|
||||||
@ -276,12 +276,12 @@ public class AioSocketChannel extends AbstractAioChannel implements SocketChanne
|
|||||||
if (byteBuf.hasNioBuffers()) {
|
if (byteBuf.hasNioBuffers()) {
|
||||||
ByteBuffer[] buffers = byteBuf.nioBuffers(byteBuf.writerIndex(), byteBuf.writableBytes());
|
ByteBuffer[] buffers = byteBuf.nioBuffers(byteBuf.writerIndex(), byteBuf.writableBytes());
|
||||||
javaChannel().read(buffers, 0, buffers.length, config.getWriteTimeout(),
|
javaChannel().read(buffers, 0, buffers.length, config.getWriteTimeout(),
|
||||||
TimeUnit.MILLISECONDS, AioSocketChannel.this, SCATTERING_READ_HANDLER);
|
TimeUnit.MILLISECONDS, this, SCATTERING_READ_HANDLER);
|
||||||
} else {
|
} else {
|
||||||
// Get a ByteBuffer view on the ByteBuf
|
// Get a ByteBuffer view on the ByteBuf
|
||||||
ByteBuffer buffer = byteBuf.nioBuffer(byteBuf.writerIndex(), byteBuf.writableBytes());
|
ByteBuffer buffer = byteBuf.nioBuffer(byteBuf.writerIndex(), byteBuf.writableBytes());
|
||||||
javaChannel().read(buffer, config.getWriteTimeout(), TimeUnit.MILLISECONDS,
|
javaChannel().read(buffer, config.getWriteTimeout(), TimeUnit.MILLISECONDS,
|
||||||
AioSocketChannel.this, READ_HANDLER);
|
this, READ_HANDLER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user