Fix compilation warnings
This commit is contained in:
parent
7278664c0b
commit
44938973b4
@ -358,9 +358,9 @@ public class Bootstrap implements ExternalResourceReleasable {
|
|||||||
|
|
||||||
// Does not implement OrderedMap interface. As a last resort, try to
|
// Does not implement OrderedMap interface. As a last resort, try to
|
||||||
// create a new instance and test if the insertion order is maintained.
|
// create a new instance and test if the insertion order is maintained.
|
||||||
Map newMap;
|
Map<Object, Object> newMap;
|
||||||
try {
|
try {
|
||||||
newMap = (Map) mapType.newInstance();
|
newMap = (Map<Object, Object>) mapType.newInstance();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// No default constructor - cannot proceed anymore.
|
// No default constructor - cannot proceed anymore.
|
||||||
return false;
|
return false;
|
||||||
|
@ -170,6 +170,7 @@ public class DefaultChannelFuture implements ChannelFuture {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public ChannelFuture rethrowIfFailed() throws Exception {
|
public ChannelFuture rethrowIfFailed() throws Exception {
|
||||||
if (!isDone()) {
|
if (!isDone()) {
|
||||||
return this;
|
return this;
|
||||||
|
@ -423,7 +423,9 @@ public class DefaultChannelPipeline implements ChannelPipeline {
|
|||||||
if (ctx == null) {
|
if (ctx == null) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return (T) ctx.getHandler();
|
@SuppressWarnings("unchecked")
|
||||||
|
T handler = (T) ctx.getHandler();
|
||||||
|
return handler;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ public class FailedChannelFuture extends CompleteChannelFuture {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public ChannelFuture rethrowIfFailed() throws Exception {
|
public ChannelFuture rethrowIfFailed() throws Exception {
|
||||||
if (cause instanceof Exception) {
|
if (cause instanceof Exception) {
|
||||||
throw (Exception) cause;
|
throw (Exception) cause;
|
||||||
|
@ -284,7 +284,9 @@ public class StaticChannelPipeline implements ChannelPipeline {
|
|||||||
if (ctx == null) {
|
if (ctx == null) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
return (T) ctx.getHandler();
|
@SuppressWarnings("unchecked")
|
||||||
|
T handler = (T) ctx.getHandler();
|
||||||
|
return handler;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ public class SucceededChannelFuture extends CompleteChannelFuture {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public ChannelFuture rethrowIfFailed() throws Exception {
|
public ChannelFuture rethrowIfFailed() throws Exception {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,8 @@ public class NioDatagramWorkerPool extends AbstractNioWorkerPool<NioDatagramWork
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Deprecated
|
||||||
protected NioDatagramWorker createWorker(Executor executor) {
|
protected NioDatagramWorker createWorker(Executor executor) {
|
||||||
return new NioDatagramWorker(executor);
|
return new NioDatagramWorker(executor);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ public class NioWorkerPool extends AbstractNioWorkerPool<NioWorker> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Deprecated
|
||||||
protected NioWorker createWorker(Executor executor) {
|
protected NioWorker createWorker(Executor executor) {
|
||||||
return new NioWorker(executor, determiner);
|
return new NioWorker(executor, determiner);
|
||||||
}
|
}
|
||||||
|
@ -122,10 +122,12 @@ abstract class AbstractCodecEmbedder<E> implements CodecEmbedder<E> {
|
|||||||
return productQueue.isEmpty();
|
return productQueue.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public final E poll() {
|
public final E poll() {
|
||||||
return (E) productQueue.poll();
|
return (E) productQueue.poll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public final E peek() {
|
public final E peek() {
|
||||||
return (E) productQueue.peek();
|
return (E) productQueue.peek();
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ public class DefaultSpdyDataFrame implements SpdyDataFrame {
|
|||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getStreamID() {
|
public int getStreamID() {
|
||||||
return getStreamId();
|
return getStreamId();
|
||||||
}
|
}
|
||||||
@ -46,6 +47,7 @@ public class DefaultSpdyDataFrame implements SpdyDataFrame {
|
|||||||
return streamId;
|
return streamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setStreamID(int streamId) {
|
public void setStreamID(int streamId) {
|
||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
@ -66,10 +68,12 @@ public class DefaultSpdyDataFrame implements SpdyDataFrame {
|
|||||||
this.last = last;
|
this.last = last;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public boolean isCompressed() {
|
public boolean isCompressed() {
|
||||||
return compressed;
|
return compressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setCompressed(boolean compressed) {
|
public void setCompressed(boolean compressed) {
|
||||||
this.compressed = compressed;
|
this.compressed = compressed;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +55,7 @@ public class DefaultSpdyGoAwayFrame implements SpdyGoAwayFrame {
|
|||||||
setStatus(status);
|
setStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getLastGoodStreamID() {
|
public int getLastGoodStreamID() {
|
||||||
return getLastGoodStreamId();
|
return getLastGoodStreamId();
|
||||||
}
|
}
|
||||||
@ -63,6 +64,7 @@ public class DefaultSpdyGoAwayFrame implements SpdyGoAwayFrame {
|
|||||||
return lastGoodStreamId;
|
return lastGoodStreamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setLastGoodStreamID(int lastGoodStreamId) {
|
public void setLastGoodStreamID(int lastGoodStreamId) {
|
||||||
setLastGoodStreamId(lastGoodStreamId);
|
setLastGoodStreamId(lastGoodStreamId);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ public class DefaultSpdyHeadersFrame extends DefaultSpdyHeaderBlock
|
|||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getStreamID() {
|
public int getStreamID() {
|
||||||
return getStreamId();
|
return getStreamId();
|
||||||
}
|
}
|
||||||
@ -44,6 +45,7 @@ public class DefaultSpdyHeadersFrame extends DefaultSpdyHeaderBlock
|
|||||||
return streamId;
|
return streamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setStreamID(int streamId) {
|
public void setStreamID(int streamId) {
|
||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ public class DefaultSpdyPingFrame implements SpdyPingFrame {
|
|||||||
setId(id);
|
setId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getID() {
|
public int getID() {
|
||||||
return getId();
|
return getId();
|
||||||
}
|
}
|
||||||
@ -41,6 +42,7 @@ public class DefaultSpdyPingFrame implements SpdyPingFrame {
|
|||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setID(int id) {
|
public void setID(int id) {
|
||||||
setId(id);
|
setId(id);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ public class DefaultSpdyRstStreamFrame implements SpdyRstStreamFrame {
|
|||||||
setStatus(status);
|
setStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getStreamID() {
|
public int getStreamID() {
|
||||||
return getStreamId();
|
return getStreamId();
|
||||||
}
|
}
|
||||||
@ -54,6 +55,7 @@ public class DefaultSpdyRstStreamFrame implements SpdyRstStreamFrame {
|
|||||||
return streamId;
|
return streamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setStreamID(int streamId) {
|
public void setStreamID(int streamId) {
|
||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ public class DefaultSpdySettingsFrame implements SpdySettingsFrame {
|
|||||||
private boolean clear;
|
private boolean clear;
|
||||||
private final Map<Integer, Setting> settingsMap = new TreeMap<Integer, Setting>();
|
private final Map<Integer, Setting> settingsMap = new TreeMap<Integer, Setting>();
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public Set<Integer> getIDs() {
|
public Set<Integer> getIDs() {
|
||||||
return getIds();
|
return getIds();
|
||||||
}
|
}
|
||||||
@ -77,6 +78,7 @@ public class DefaultSpdySettingsFrame implements SpdySettingsFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public boolean persistValue(int id) {
|
public boolean persistValue(int id) {
|
||||||
return isPersistValue(id);
|
return isPersistValue(id);
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@ public class DefaultSpdySynReplyFrame extends DefaultSpdyHeaderBlock
|
|||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getStreamID() {
|
public int getStreamID() {
|
||||||
return getStreamId();
|
return getStreamId();
|
||||||
}
|
}
|
||||||
@ -43,6 +44,7 @@ public class DefaultSpdySynReplyFrame extends DefaultSpdyHeaderBlock
|
|||||||
return streamId;
|
return streamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setStreamID(int streamId) {
|
public void setStreamID(int streamId) {
|
||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@ public class DefaultSpdySynStreamFrame extends DefaultSpdyHeaderBlock
|
|||||||
setPriority(priority);
|
setPriority(priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getStreamID() {
|
public int getStreamID() {
|
||||||
return getStreamId();
|
return getStreamId();
|
||||||
}
|
}
|
||||||
@ -51,6 +52,7 @@ public class DefaultSpdySynStreamFrame extends DefaultSpdyHeaderBlock
|
|||||||
return streamId;
|
return streamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setStreamID(int streamId) {
|
public void setStreamID(int streamId) {
|
||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
@ -63,6 +65,7 @@ public class DefaultSpdySynStreamFrame extends DefaultSpdyHeaderBlock
|
|||||||
this.streamId = streamId;
|
this.streamId = streamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getAssociatedToStreamID() {
|
public int getAssociatedToStreamID() {
|
||||||
return getAssociatedToStreamId();
|
return getAssociatedToStreamId();
|
||||||
}
|
}
|
||||||
@ -71,6 +74,7 @@ public class DefaultSpdySynStreamFrame extends DefaultSpdyHeaderBlock
|
|||||||
return associatedToStreamId;
|
return associatedToStreamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setAssociatedToStreamID(int associatedToStreamId) {
|
public void setAssociatedToStreamID(int associatedToStreamId) {
|
||||||
setAssociatedToStreamId(associatedToStreamId);
|
setAssociatedToStreamId(associatedToStreamId);
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ public class DefaultSpdyWindowUpdateFrame implements SpdyWindowUpdateFrame {
|
|||||||
setDeltaWindowSize(deltaWindowSize);
|
setDeltaWindowSize(deltaWindowSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getStreamID() {
|
public int getStreamID() {
|
||||||
return getStreamId();
|
return getStreamId();
|
||||||
}
|
}
|
||||||
@ -44,6 +45,7 @@ public class DefaultSpdyWindowUpdateFrame implements SpdyWindowUpdateFrame {
|
|||||||
return streamId;
|
return streamId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setStreamID(int streamId) {
|
public void setStreamID(int streamId) {
|
||||||
setStreamId(streamId);
|
setStreamId(streamId);
|
||||||
}
|
}
|
||||||
|
@ -120,6 +120,7 @@ public final class OrderedDownstreamThreadPoolExecutor extends OrderedMemoryAwar
|
|||||||
* size in this implementation
|
* size in this implementation
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Deprecated
|
||||||
public void setMaxTotalMemorySize(long maxTotalMemorySize) {
|
public void setMaxTotalMemorySize(long maxTotalMemorySize) {
|
||||||
throw new UnsupportedOperationException("Not supported by this implementation");
|
throw new UnsupportedOperationException("Not supported by this implementation");
|
||||||
}
|
}
|
||||||
|
@ -15,11 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.handler.queue;
|
package org.jboss.netty.handler.queue;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.concurrent.BlockingQueue;
|
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import org.jboss.netty.buffer.ChannelBuffer;
|
import org.jboss.netty.buffer.ChannelBuffer;
|
||||||
import org.jboss.netty.channel.Channel;
|
import org.jboss.netty.channel.Channel;
|
||||||
import org.jboss.netty.channel.ChannelEvent;
|
import org.jboss.netty.channel.ChannelEvent;
|
||||||
@ -31,6 +26,11 @@ import org.jboss.netty.channel.MessageEvent;
|
|||||||
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
|
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
|
||||||
import org.jboss.netty.util.internal.DeadLockProofWorker;
|
import org.jboss.netty.util.internal.DeadLockProofWorker;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.concurrent.BlockingQueue;
|
||||||
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Emulates blocking read operation. This handler stores all received messages
|
* Emulates blocking read operation. This handler stores all received messages
|
||||||
* into a {@link BlockingQueue} and returns the received messages when
|
* into a {@link BlockingQueue} and returns the received messages when
|
||||||
@ -267,6 +267,7 @@ public class BlockingReadHandler<E> extends SimpleChannelUpstreamHandler {
|
|||||||
getQueue().put(e);
|
getQueue().put(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
private E getMessage(MessageEvent e) {
|
private E getMessage(MessageEvent e) {
|
||||||
return (E) e.getMessage();
|
return (E) e.getMessage();
|
||||||
}
|
}
|
||||||
|
@ -15,13 +15,13 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.channel;
|
package org.jboss.netty.channel;
|
||||||
|
|
||||||
import static org.easymock.EasyMock.*;
|
import org.junit.Before;
|
||||||
import static org.junit.Assert.*;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import org.junit.Before;
|
import static org.easymock.EasyMock.*;
|
||||||
import org.junit.Test;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class CompleteChannelFutureTest {
|
public class CompleteChannelFutureTest {
|
||||||
|
|
||||||
@ -97,6 +97,7 @@ public class CompleteChannelFutureTest {
|
|||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public ChannelFuture rethrowIfFailed() throws Exception {
|
public ChannelFuture rethrowIfFailed() throws Exception {
|
||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user