Fixed compiler warnings

This commit is contained in:
Trustin Lee 2009-06-09 10:19:29 +00:00
parent be12a1bdf1
commit 583ddfe992
8 changed files with 16 additions and 16 deletions

View File

@ -279,7 +279,7 @@ public abstract class FrameDecoder extends SimpleChannelUpstreamHandler {
for (int i = 0; i < length; i ++) {
Channels.fireMessageReceived(context, Array.get(result, i), remoteAddress);
}
} else if (result instanceof Iterable) {
} else if (result instanceof Iterable<?>) {
for (Object r: (Iterable<?>) result) {
Channels.fireMessageReceived(context, r, remoteAddress);
}

View File

@ -93,7 +93,7 @@ public class DefaultHttpMessage implements HttpMessage {
throw new IllegalArgumentException("values is empty.");
}
if (values instanceof List) {
if (values instanceof List<?>) {
headers.put(name, (List<String>) values);
} else {
List<String> valueList = new LinkedList<String>();

View File

@ -457,7 +457,7 @@ public abstract class ReplayingDecoder<T extends Enum<T>>
for (int i = 0; i < length; i ++) {
Channels.fireMessageReceived(context, Array.get(result, i), remoteAddress);
}
} else if (result instanceof Iterable) {
} else if (result instanceof Iterable<?>) {
for (Object r: (Iterable<?>) result) {
Channels.fireMessageReceived(context, r, remoteAddress);
}

View File

@ -83,7 +83,7 @@ public class DefaultObjectSizeEstimator implements ObjectSizeEstimator {
answer += ((ByteBuffer) o).remaining();
} else if (o instanceof CharSequence) {
answer += ((CharSequence) o).length() << 1;
} else if (o instanceof Iterable) {
} else if (o instanceof Iterable<?>) {
for (Object m : (Iterable<?>) o) {
answer += estimateSize(m);
}

View File

@ -1259,7 +1259,7 @@ public final class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
@Override
public boolean equals(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
@SuppressWarnings("unchecked")
@ -1390,7 +1390,7 @@ public final class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
@Override
public boolean contains(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
@ -1400,7 +1400,7 @@ public final class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
@Override
public boolean remove(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;

View File

@ -1261,7 +1261,7 @@ public final class ConcurrentIdentityHashMap<K, V> extends AbstractMap<K, V>
@Override
public boolean equals(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
@SuppressWarnings("unchecked")
@ -1392,7 +1392,7 @@ public final class ConcurrentIdentityHashMap<K, V> extends AbstractMap<K, V>
@Override
public boolean contains(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
@ -1402,7 +1402,7 @@ public final class ConcurrentIdentityHashMap<K, V> extends AbstractMap<K, V>
@Override
public boolean remove(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;

View File

@ -1339,7 +1339,7 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
@Override
public boolean equals(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
@SuppressWarnings("unchecked")
@ -1470,7 +1470,7 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
@Override
public boolean contains(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
@ -1480,7 +1480,7 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
@Override
public boolean remove(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;

View File

@ -1339,7 +1339,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
@Override
public boolean equals(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
@SuppressWarnings("unchecked")
@ -1470,7 +1470,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
@Override
public boolean contains(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
@ -1480,7 +1480,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
@Override
public boolean remove(Object o) {
if (!(o instanceof Map.Entry)) {
if (!(o instanceof Map.Entry<?, ?>)) {
return false;
}
Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;