Merge pull request #52 from motlin/master
Fixes from static-analysis tools.
This commit is contained in:
commit
2e3971953b
@ -60,7 +60,6 @@ public class Bootstrap implements ExternalResourceReleasable {
|
||||
* I/O operation is requested.
|
||||
*/
|
||||
protected Bootstrap() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -118,7 +118,6 @@ public class ClientBootstrap extends Bootstrap {
|
||||
* operation is requested.
|
||||
*/
|
||||
public ClientBootstrap() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -127,7 +127,6 @@ public class ConnectionlessBootstrap extends Bootstrap {
|
||||
* operation is requested.
|
||||
*/
|
||||
public ConnectionlessBootstrap() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -170,7 +170,6 @@ public class ServerBootstrap extends Bootstrap {
|
||||
* operation is requested.
|
||||
*/
|
||||
public ServerBootstrap() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
@ -57,7 +57,6 @@ public class HeapChannelBufferFactory extends AbstractChannelBufferFactory {
|
||||
* {@link ByteOrder#BIG_ENDIAN}.
|
||||
*/
|
||||
public HeapChannelBufferFactory() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,6 @@ public abstract class AbstractChannelSink implements ChannelSink {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
protected AbstractChannelSink() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,6 @@ public class ChannelException extends RuntimeException {
|
||||
* Creates a new exception.
|
||||
*/
|
||||
public ChannelException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,6 @@ public class ChannelHandlerLifeCycleException extends RuntimeException {
|
||||
* Creates a new exception.
|
||||
*/
|
||||
public ChannelHandlerLifeCycleException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,6 @@ public class ChannelPipelineException extends ChannelException {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public ChannelPipelineException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,5 +100,5 @@ public enum ChannelState {
|
||||
* Represents a {@link Channel}'s {@link Channel#getInterestOps() interestOps}
|
||||
* property
|
||||
*/
|
||||
INTEREST_OPS;
|
||||
INTEREST_OPS
|
||||
}
|
||||
|
@ -817,7 +817,6 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
||||
|
||||
private static final class DiscardingChannelSink implements ChannelSink {
|
||||
DiscardingChannelSink() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +61,6 @@ public class SimpleChannelDownstreamHandler implements ChannelDownstreamHandler
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public SimpleChannelDownstreamHandler() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,7 +85,6 @@ public class SimpleChannelHandler implements ChannelUpstreamHandler, ChannelDown
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public SimpleChannelHandler() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,7 +65,6 @@ public class SimpleChannelUpstreamHandler implements ChannelUpstreamHandler {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public SimpleChannelUpstreamHandler() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,8 +59,7 @@ final class CombinedIterator<E> implements Iterator<E> {
|
||||
@Override
|
||||
public E next() {
|
||||
try {
|
||||
E e = currentIterator.next();
|
||||
return e;
|
||||
return currentIterator.next();
|
||||
} catch (NoSuchElementException e) {
|
||||
if (currentIterator == i1) {
|
||||
currentIterator = i2;
|
||||
|
@ -43,7 +43,6 @@ final class LocalClientChannelSink extends AbstractChannelSink {
|
||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(LocalClientChannelSink.class);
|
||||
|
||||
LocalClientChannelSink() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,7 +36,6 @@ import org.jboss.netty.channel.MessageEvent;
|
||||
final class LocalServerChannelSink extends AbstractChannelSink {
|
||||
|
||||
LocalServerChannelSink() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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) {
|
||||
|
@ -103,7 +103,6 @@ public class HttpTunnelServerChannel extends AbstractServerChannel implements
|
||||
HttpTunnelAcceptedChannelFactory {
|
||||
|
||||
TunnelCreator() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -258,7 +258,6 @@ class ServerMessageSwitch implements ServerMessageSwitchUpstreamInterface,
|
||||
|
||||
private static final class TunnelInfo {
|
||||
TunnelInfo() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String tunnelId;
|
||||
|
@ -173,7 +173,6 @@ class NioClientSocketPipelineSink extends AbstractChannelSink {
|
||||
private final Queue<Runnable> registerTaskQueue = new LinkedTransferQueue<Runnable>();
|
||||
|
||||
Boss() {
|
||||
super();
|
||||
}
|
||||
|
||||
void register(NioClientSocketChannel channel) {
|
||||
|
@ -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
|
||||
|
@ -220,7 +220,6 @@ class NioProviderMetadata {
|
||||
private static final class ConstraintLevelAutodetector {
|
||||
|
||||
ConstraintLevelAutodetector() {
|
||||
super();
|
||||
}
|
||||
|
||||
int autodetect() {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,6 @@ public class WebSocketServerHandler extends SimpleChannelUpstreamHandler {
|
||||
} else {
|
||||
this.handshaker.executeOpeningHandshake(ctx, req);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) {
|
||||
|
@ -98,7 +98,6 @@ public class App {
|
||||
public ArrayList<String> messagesReceived = new ArrayList<String>();
|
||||
|
||||
public MyCallbackHandler() {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -104,7 +104,6 @@ public class WebSocketServerHandler extends SimpleChannelUpstreamHandler {
|
||||
} else {
|
||||
this.handshaker.executeOpeningHandshake(ctx, req);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
private void handleWebSocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) {
|
||||
|
@ -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
|
||||
|
@ -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.",
|
||||
|
@ -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,
|
||||
|
@ -33,7 +33,6 @@ public class CompressionException extends RuntimeException {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public CompressionException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -58,6 +58,5 @@ final class ZlibUtil {
|
||||
}
|
||||
|
||||
private ZlibUtil() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -194,7 +194,6 @@ abstract class AbstractCodecEmbedder<E> implements CodecEmbedder<E> {
|
||||
|
||||
private final class EmbeddedChannelSink implements ChannelSink, ChannelUpstreamHandler {
|
||||
EmbeddedChannelSink() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -234,7 +233,6 @@ abstract class AbstractCodecEmbedder<E> implements CodecEmbedder<E> {
|
||||
private static final class EmbeddedChannelPipeline extends DefaultChannelPipeline {
|
||||
|
||||
EmbeddedChannelPipeline() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,7 +33,6 @@ public class CodecEmbedderException extends RuntimeException {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public CodecEmbedderException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,7 +29,6 @@ class EmbeddedChannelFactory implements ChannelFactory {
|
||||
static final ChannelFactory INSTANCE = new EmbeddedChannelFactory();
|
||||
|
||||
private EmbeddedChannelFactory() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -34,7 +34,6 @@ public class CorruptedFrameException extends Exception {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public CorruptedFrameException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,6 @@ public class TooLongFrameException extends Exception {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public TooLongFrameException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,6 @@ final class CaseIgnoringComparator implements Comparator<String>, Serializable {
|
||||
static final CaseIgnoringComparator INSTANCE = new CaseIgnoringComparator();
|
||||
|
||||
private CaseIgnoringComparator() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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
|
||||
|
@ -87,7 +87,6 @@ public class HttpClientCodec implements ChannelUpstreamHandler,
|
||||
private final class Encoder extends HttpRequestEncoder {
|
||||
|
||||
Encoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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) {
|
||||
|
@ -54,7 +54,6 @@ public abstract class HttpContentDecoder extends SimpleChannelUpstreamHandler {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
protected HttpContentDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,7 +61,6 @@ public abstract class HttpContentEncoder extends SimpleChannelHandler {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
protected HttpContentEncoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
READ_CHUNKED_CONTENT,
|
||||
READ_CHUNKED_CONTENT_AS_CHUNKS,
|
||||
READ_CHUNK_DELIMITER,
|
||||
READ_CHUNK_FOOTER;
|
||||
READ_CHUNK_FOOTER
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,7 +59,6 @@ public abstract class HttpMessageEncoder extends OneToOneEncoder {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
protected HttpMessageEncoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -119,7 +119,6 @@ public class HttpPostBodyUtil {
|
||||
}
|
||||
|
||||
private HttpPostBodyUtil() {
|
||||
super();
|
||||
}
|
||||
|
||||
//Some commons methods between HttpPostRequestDecoder and HttpMessageDecoder
|
||||
|
@ -246,7 +246,7 @@ public class HttpPostRequestDecoder {
|
||||
MIXEDCLOSEDELIMITER,
|
||||
CLOSEDELIMITER,
|
||||
PREEPILOGUE,
|
||||
EPILOGUE;
|
||||
EPILOGUE
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1397,7 +1397,6 @@ public class HttpPostRequestDecoder {
|
||||
*
|
||||
*/
|
||||
public NotEnoughDataDecoderException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1453,7 +1452,6 @@ public class HttpPostRequestDecoder {
|
||||
*
|
||||
*/
|
||||
public ErrorDataDecoderException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1495,7 +1493,6 @@ public class HttpPostRequestDecoder {
|
||||
*
|
||||
*/
|
||||
public IncompatibleDataDecoderException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -965,7 +965,6 @@ public class HttpPostRequestEncoder implements ChunkedInput {
|
||||
*
|
||||
*/
|
||||
public ErrorDataEncoderException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,7 +65,6 @@ public class HttpRequestDecoder extends HttpMessageDecoder {
|
||||
* {@code maxChunkSize (8192)}.
|
||||
*/
|
||||
public HttpRequestDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,6 @@ public class HttpRequestEncoder extends HttpMessageEncoder {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public HttpRequestEncoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,7 +94,6 @@ public class HttpResponseDecoder extends HttpMessageDecoder {
|
||||
* {@code maxChunkSize (8192)}.
|
||||
*/
|
||||
public HttpResponseDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,6 @@ public class HttpResponseEncoder extends HttpMessageEncoder {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public HttpResponseEncoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -25,7 +25,7 @@ package org.jboss.netty.handler.codec.http;
|
||||
*/
|
||||
public interface InterfaceHttpData extends Comparable<InterfaceHttpData> {
|
||||
enum HttpDataType {
|
||||
Attribute, FileUpload, InternalAttribute;
|
||||
Attribute, FileUpload, InternalAttribute
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ public abstract class WebSocketServerHandshaker {
|
||||
this.subProtocolsArray[i] = this.subProtocolsArray[i].trim();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -57,7 +57,6 @@ public abstract class OneToOneDecoder implements ChannelUpstreamHandler {
|
||||
* Creates a new instance with the current system character set.
|
||||
*/
|
||||
protected OneToOneDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -51,7 +51,6 @@ import org.jboss.netty.handler.codec.frame.Delimiters;
|
||||
public abstract class OneToOneEncoder implements ChannelDownstreamHandler {
|
||||
|
||||
protected OneToOneEncoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,7 +53,6 @@ public class ProtobufVarint32FrameDecoder extends FrameDecoder {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public ProtobufVarint32FrameDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,7 +52,6 @@ public class ProtobufVarint32LengthFieldPrepender extends OneToOneEncoder {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public ProtobufVarint32LengthFieldPrepender() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -363,7 +363,7 @@ class ReplayingDecoderBuffer implements ChannelBuffer {
|
||||
} else {
|
||||
return Integer.MAX_VALUE - buffer.readerIndex();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean readBoolean() {
|
||||
|
@ -35,7 +35,6 @@ public class UnreplayableOperationException extends
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public UnreplayableOperationException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ public abstract class RtspMessageEncoder extends HttpMessageEncoder {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
protected RtspMessageEncoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -141,6 +141,5 @@ public final class RtspMethods {
|
||||
}
|
||||
|
||||
private RtspMethods() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ public class RtspRequestDecoder extends RtspMessageDecoder {
|
||||
* {@code maxContentLength (8192)}.
|
||||
*/
|
||||
public RtspRequestDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,7 +62,6 @@ public class RtspResponseDecoder extends RtspMessageDecoder {
|
||||
* {@code maxContentLength (8192)}.
|
||||
*/
|
||||
public RtspResponseDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -295,6 +295,5 @@ public final class RtspResponseStatuses {
|
||||
}
|
||||
|
||||
private RtspResponseStatuses() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
@ -54,6 +54,5 @@ public final class RtspVersions {
|
||||
}
|
||||
|
||||
private RtspVersions() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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) {
|
||||
|
@ -287,7 +287,6 @@ public class OrderedMemoryAwareThreadPoolExecutor extends
|
||||
private final LinkedList<Runnable> tasks = new LinkedList<Runnable>();
|
||||
|
||||
ChildExecutor() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,7 +82,6 @@ public class IpFilterRuleHandler extends IpFilteringHandlerImpl
|
||||
*/
|
||||
public IpFilterRuleHandler()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
// Below are methods directly inspired from CopyOnWriteArrayList methods
|
||||
|
@ -59,8 +59,7 @@ public class IpFilterRuleList extends ArrayList<IpFilterRule>
|
||||
*/
|
||||
public IpFilterRuleList(String rules)
|
||||
{
|
||||
super();
|
||||
parseRules(rules);
|
||||
parseRules(rules);
|
||||
}
|
||||
|
||||
private void parseRules(String rules)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -39,8 +39,7 @@ public class IpSubnetFilterRule extends IpSubnet implements IpFilterRule
|
||||
*/
|
||||
public IpSubnetFilterRule(boolean allow)
|
||||
{
|
||||
super();
|
||||
isAllowRule = allow;
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,8 +36,7 @@ public class IpV4SubnetFilterRule extends IpV4Subnet implements IpFilterRule
|
||||
*/
|
||||
public IpV4SubnetFilterRule(boolean allow)
|
||||
{
|
||||
super();
|
||||
isAllowRule = allow;
|
||||
isAllowRule = allow;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,6 @@ public class BlockingReadTimeoutException extends InterruptedIOException {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public BlockingReadTimeoutException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,5 +37,5 @@ public enum IdleState {
|
||||
/**
|
||||
* No data was either received or sent for a while.
|
||||
*/
|
||||
ALL_IDLE;
|
||||
ALL_IDLE
|
||||
}
|
||||
|
@ -443,7 +443,6 @@ public class IdleStateHandler extends SimpleChannelUpstreamHandler
|
||||
|
||||
private static final class State {
|
||||
State() {
|
||||
super();
|
||||
}
|
||||
|
||||
volatile Timeout readerIdleTimeout;
|
||||
|
@ -31,7 +31,6 @@ public class ReadTimeoutException extends TimeoutException {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public ReadTimeoutException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -259,7 +259,6 @@ public class ReadTimeoutHandler extends SimpleChannelUpstreamHandler
|
||||
volatile long lastReadTime = System.currentTimeMillis();
|
||||
|
||||
State() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ public class TimeoutException extends ChannelException {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public TimeoutException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -32,7 +32,6 @@ public class WriteTimeoutException extends TimeoutException {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
public WriteTimeoutException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
@ -30,7 +30,6 @@ public abstract class AbstractInternalLogger implements InternalLogger {
|
||||
* Creates a new instance.
|
||||
*/
|
||||
protected AbstractInternalLogger() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,5 +38,5 @@ public enum InternalLogLevel {
|
||||
/**
|
||||
* 'ERROR' log level.
|
||||
*/
|
||||
ERROR;
|
||||
ERROR
|
||||
}
|
||||
|
@ -45,6 +45,5 @@ public class ExternalResourceUtil {
|
||||
}
|
||||
|
||||
private ExternalResourceUtil() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +362,6 @@ public class HashedWheelTimer implements Timer {
|
||||
private long tick;
|
||||
|
||||
Worker() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user