Fix some warnings at generics usage
Motivation: Existing warnings from java compiler Modifications: Add/fix type parameters Result: Less warnings
This commit is contained in:
parent
ce222308a6
commit
634a8afa53
@ -38,7 +38,7 @@ public class XmlDecoder extends ByteToMessageDecoder {
|
||||
private static final AsyncXMLInputFactory XML_INPUT_FACTORY = new InputFactoryImpl();
|
||||
private static final XmlDocumentEnd XML_DOCUMENT_END = XmlDocumentEnd.INSTANCE;
|
||||
|
||||
private final AsyncXMLStreamReader streamReader = XML_INPUT_FACTORY.createAsyncForByteArray();
|
||||
private final AsyncXMLStreamReader<AsyncByteArrayFeeder> streamReader = XML_INPUT_FACTORY.createAsyncForByteArray();
|
||||
private final AsyncByteArrayFeeder streamFeeder = (AsyncByteArrayFeeder) streamReader.getInputFeeder();
|
||||
|
||||
@Override
|
||||
|
@ -478,7 +478,7 @@ public class DefaultPromise<V> extends AbstractFuture<V> implements Promise<V> {
|
||||
if (listeners instanceof DefaultFutureListeners) {
|
||||
notifyListeners0((DefaultFutureListeners) listeners);
|
||||
} else {
|
||||
notifyListener0(this, (GenericFutureListener<? extends Future<V>>) listeners);
|
||||
notifyListener0(this, (GenericFutureListener<?>) listeners);
|
||||
}
|
||||
synchronized (this) {
|
||||
if (this.listeners == null) {
|
||||
@ -516,7 +516,7 @@ public class DefaultPromise<V> extends AbstractFuture<V> implements Promise<V> {
|
||||
} else if (listeners instanceof DefaultFutureListeners) {
|
||||
((DefaultFutureListeners) listeners).add(listener);
|
||||
} else {
|
||||
listeners = new DefaultFutureListeners((GenericFutureListener<? extends Future<V>>) listeners, listener);
|
||||
listeners = new DefaultFutureListeners((GenericFutureListener<?>) listeners, listener);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,8 +210,8 @@ public class HeadersBenchmark extends AbstractMicrobenchmark {
|
||||
}
|
||||
|
||||
private static final class SlowHeaders implements Headers<CharSequence, CharSequence, SlowHeaders> {
|
||||
private final Headers<CharSequence, CharSequence, ? extends Headers> delegate;
|
||||
private SlowHeaders(Headers<CharSequence, CharSequence, ? extends Headers> delegate) {
|
||||
private final Headers<CharSequence, CharSequence, ? extends Headers<?, ?, ?>> delegate;
|
||||
private SlowHeaders(Headers<CharSequence, CharSequence, ? extends Headers<?, ?, ?>> delegate) {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ public final class CompositeNameResolver<T> extends SimpleNameResolver<T> {
|
||||
if (resolverIndex >= resolvers.length) {
|
||||
promise.setFailure(lastFailure);
|
||||
} else {
|
||||
NameResolver resolver = resolvers[resolverIndex];
|
||||
NameResolver<T> resolver = resolvers[resolverIndex];
|
||||
resolver.resolve(inetHost).addListener(new FutureListener<T>() {
|
||||
@Override
|
||||
public void operationComplete(Future<T> future) throws Exception {
|
||||
@ -94,7 +94,7 @@ public final class CompositeNameResolver<T> extends SimpleNameResolver<T> {
|
||||
if (resolverIndex >= resolvers.length) {
|
||||
promise.setFailure(lastFailure);
|
||||
} else {
|
||||
NameResolver resolver = resolvers[resolverIndex];
|
||||
NameResolver<T> resolver = resolvers[resolverIndex];
|
||||
resolver.resolveAll(inetHost).addListener(new FutureListener<List<T>>() {
|
||||
@Override
|
||||
public void operationComplete(Future<List<T>> future) throws Exception {
|
||||
|
@ -24,7 +24,6 @@ import io.netty.util.Recycler.Handle;
|
||||
import io.netty.util.ReferenceCountUtil;
|
||||
import io.netty.util.concurrent.FastThreadLocal;
|
||||
import io.netty.util.internal.InternalThreadLocalMap;
|
||||
import io.netty.util.internal.PlatformDependent;
|
||||
import io.netty.util.internal.PromiseNotificationUtil;
|
||||
import io.netty.util.internal.SystemPropertyUtil;
|
||||
import io.netty.util.internal.logging.InternalLogger;
|
||||
@ -755,7 +754,7 @@ public final class ChannelOutboundBuffer {
|
||||
static final class Entry {
|
||||
private static final Recycler<Entry> RECYCLER = new Recycler<Entry>() {
|
||||
@Override
|
||||
protected Entry newObject(Handle handle) {
|
||||
protected Entry newObject(Handle<Entry> handle) {
|
||||
return new Entry(handle);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user