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 ++) { for (int i = 0; i < length; i ++) {
Channels.fireMessageReceived(context, Array.get(result, i), remoteAddress); Channels.fireMessageReceived(context, Array.get(result, i), remoteAddress);
} }
} else if (result instanceof Iterable) { } else if (result instanceof Iterable<?>) {
for (Object r: (Iterable<?>) result) { for (Object r: (Iterable<?>) result) {
Channels.fireMessageReceived(context, r, remoteAddress); Channels.fireMessageReceived(context, r, remoteAddress);
} }

View File

@ -93,7 +93,7 @@ public class DefaultHttpMessage implements HttpMessage {
throw new IllegalArgumentException("values is empty."); throw new IllegalArgumentException("values is empty.");
} }
if (values instanceof List) { if (values instanceof List<?>) {
headers.put(name, (List<String>) values); headers.put(name, (List<String>) values);
} else { } else {
List<String> valueList = new LinkedList<String>(); 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 ++) { for (int i = 0; i < length; i ++) {
Channels.fireMessageReceived(context, Array.get(result, i), remoteAddress); Channels.fireMessageReceived(context, Array.get(result, i), remoteAddress);
} }
} else if (result instanceof Iterable) { } else if (result instanceof Iterable<?>) {
for (Object r: (Iterable<?>) result) { for (Object r: (Iterable<?>) result) {
Channels.fireMessageReceived(context, r, remoteAddress); Channels.fireMessageReceived(context, r, remoteAddress);
} }

View File

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

View File

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

View File

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

View File

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

View File

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