Removed nagging compiler warnings introduced by Eclipse Helios
This commit is contained in:
parent
57dc0b3bc8
commit
4399c1e90b
@ -329,7 +329,7 @@ public class Bootstrap implements ExternalResourceReleasable {
|
|||||||
* Returns {@code true} if and only if the specified {@code map} is an
|
* Returns {@code true} if and only if the specified {@code map} is an
|
||||||
* ordered map, like {@link LinkedHashMap} is.
|
* ordered map, like {@link LinkedHashMap} is.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
static boolean isOrderedMap(Map<?, ?> map) {
|
static boolean isOrderedMap(Map<?, ?> map) {
|
||||||
Class<?> mapType = map.getClass();
|
Class<?> mapType = map.getClass();
|
||||||
if (LinkedHashMap.class.isAssignableFrom(mapType)) {
|
if (LinkedHashMap.class.isAssignableFrom(mapType)) {
|
||||||
|
@ -38,10 +38,6 @@ final class SocketSendBufferPool {
|
|||||||
private static final int ALIGN_SHIFT = 4;
|
private static final int ALIGN_SHIFT = 4;
|
||||||
private static final int ALIGN_MASK = 15;
|
private static final int ALIGN_MASK = 15;
|
||||||
|
|
||||||
static {
|
|
||||||
assert (DEFAULT_PREALLOCATION_SIZE & ALIGN_MASK) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
PreallocationRef poolHead = null;
|
PreallocationRef poolHead = null;
|
||||||
Preallocation current = new Preallocation(DEFAULT_PREALLOCATION_SIZE);
|
Preallocation current = new Preallocation(DEFAULT_PREALLOCATION_SIZE);
|
||||||
|
|
||||||
|
@ -1253,7 +1253,7 @@ public final class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
|
|||||||
if (!(o instanceof Map.Entry<?, ?>)) {
|
if (!(o instanceof Map.Entry<?, ?>)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
Map.Entry e = (Map.Entry) o;
|
Map.Entry e = (Map.Entry) o;
|
||||||
return eq(key, e.getKey()) && eq(value, e.getValue());
|
return eq(key, e.getKey()) && eq(value, e.getValue());
|
||||||
}
|
}
|
||||||
|
@ -1255,7 +1255,7 @@ public final class ConcurrentIdentityHashMap<K, V> extends AbstractMap<K, V>
|
|||||||
if (!(o instanceof Map.Entry<?, ?>)) {
|
if (!(o instanceof Map.Entry<?, ?>)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
Map.Entry e = (Map.Entry) o;
|
Map.Entry e = (Map.Entry) o;
|
||||||
return eq(key, e.getKey()) && eq(value, e.getValue());
|
return eq(key, e.getKey()) && eq(value, e.getValue());
|
||||||
}
|
}
|
||||||
|
@ -617,7 +617,7 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
final void removeStale() {
|
final void removeStale() {
|
||||||
WeakKeyReference ref;
|
WeakKeyReference ref;
|
||||||
while ((ref = (WeakKeyReference) refQueue.poll()) != null) {
|
while ((ref = (WeakKeyReference) refQueue.poll()) != null) {
|
||||||
@ -1333,7 +1333,7 @@ public final class ConcurrentIdentityWeakKeyHashMap<K, V> extends AbstractMap<K,
|
|||||||
if (!(o instanceof Map.Entry<?, ?>)) {
|
if (!(o instanceof Map.Entry<?, ?>)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
Map.Entry e = (Map.Entry) o;
|
Map.Entry e = (Map.Entry) o;
|
||||||
return eq(key, e.getKey()) && eq(value, e.getValue());
|
return eq(key, e.getKey()) && eq(value, e.getValue());
|
||||||
}
|
}
|
||||||
|
@ -617,7 +617,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
final void removeStale() {
|
final void removeStale() {
|
||||||
WeakKeyReference ref;
|
WeakKeyReference ref;
|
||||||
while ((ref = (WeakKeyReference) refQueue.poll()) != null) {
|
while ((ref = (WeakKeyReference) refQueue.poll()) != null) {
|
||||||
@ -1333,7 +1333,7 @@ public final class ConcurrentWeakKeyHashMap<K, V> extends AbstractMap<K, V> impl
|
|||||||
if (!(o instanceof Map.Entry<?, ?>)) {
|
if (!(o instanceof Map.Entry<?, ?>)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
Map.Entry e = (Map.Entry) o;
|
Map.Entry e = (Map.Entry) o;
|
||||||
return eq(key, e.getKey()) && eq(value, e.getValue());
|
return eq(key, e.getKey()) && eq(value, e.getValue());
|
||||||
}
|
}
|
||||||
|
@ -1337,13 +1337,13 @@ public class LinkedTransferQueue<E> extends AbstractQueue<E>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
private static final AtomicReferenceFieldUpdater<LinkedTransferQueue, Node> headUpdater =
|
private static final AtomicReferenceFieldUpdater<LinkedTransferQueue, Node> headUpdater =
|
||||||
AtomicFieldUpdaterUtil.newRefUpdater(LinkedTransferQueue.class, Node.class, "head");
|
AtomicFieldUpdaterUtil.newRefUpdater(LinkedTransferQueue.class, Node.class, "head");
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
private static final AtomicReferenceFieldUpdater<LinkedTransferQueue, Node> tailUpdater =
|
private static final AtomicReferenceFieldUpdater<LinkedTransferQueue, Node> tailUpdater =
|
||||||
AtomicFieldUpdaterUtil.newRefUpdater(LinkedTransferQueue.class, Node.class, "tail");
|
AtomicFieldUpdaterUtil.newRefUpdater(LinkedTransferQueue.class, Node.class, "tail");
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
private static final AtomicIntegerFieldUpdater<LinkedTransferQueue> sweepVotesUpdater =
|
private static final AtomicIntegerFieldUpdater<LinkedTransferQueue> sweepVotesUpdater =
|
||||||
AtomicFieldUpdaterUtil.newIntUpdater(LinkedTransferQueue.class, "sweepVotes");
|
AtomicFieldUpdaterUtil.newIntUpdater(LinkedTransferQueue.class, "sweepVotes");
|
||||||
}
|
}
|
||||||
|
@ -78,8 +78,7 @@ public final class ZStream {
|
|||||||
return inflateInit(w, WrapperType.ZLIB);
|
return inflateInit(w, WrapperType.ZLIB);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
public int inflateInit(int w, Enum<?> wrapperType) {
|
||||||
public int inflateInit(int w, Enum wrapperType) {
|
|
||||||
istate = new Inflate();
|
istate = new Inflate();
|
||||||
return istate.inflateInit(this, w, (WrapperType) wrapperType);
|
return istate.inflateInit(this, w, (WrapperType) wrapperType);
|
||||||
}
|
}
|
||||||
@ -118,8 +117,7 @@ public final class ZStream {
|
|||||||
return deflateInit(level, JZlib.MAX_WBITS);
|
return deflateInit(level, JZlib.MAX_WBITS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
public int deflateInit(int level, Enum<?> wrapperType) {
|
||||||
public int deflateInit(int level, Enum wrapperType) {
|
|
||||||
return deflateInit(level, JZlib.MAX_WBITS, wrapperType);
|
return deflateInit(level, JZlib.MAX_WBITS, wrapperType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,8 +125,7 @@ public final class ZStream {
|
|||||||
return deflateInit(level, bits, WrapperType.ZLIB);
|
return deflateInit(level, bits, WrapperType.ZLIB);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
public int deflateInit(int level, int bits, Enum<?> wrapperType) {
|
||||||
public int deflateInit(int level, int bits, Enum wrapperType) {
|
|
||||||
dstate = new Deflate();
|
dstate = new Deflate();
|
||||||
return dstate.deflateInit(this, level, bits, (WrapperType) wrapperType);
|
return dstate.deflateInit(this, level, bits, (WrapperType) wrapperType);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ import org.junit.Test;
|
|||||||
public class MapBackedSetTest {
|
public class MapBackedSetTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void testSize() {
|
public void testSize() {
|
||||||
Map map = createStrictMock(Map.class);
|
Map map = createStrictMock(Map.class);
|
||||||
expect(map.size()).andReturn(0);
|
expect(map.size()).andReturn(0);
|
||||||
@ -46,7 +46,7 @@ public class MapBackedSetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void testContains() {
|
public void testContains() {
|
||||||
Map map = createStrictMock(Map.class);
|
Map map = createStrictMock(Map.class);
|
||||||
expect(map.containsKey("key")).andReturn(true);
|
expect(map.containsKey("key")).andReturn(true);
|
||||||
@ -58,7 +58,7 @@ public class MapBackedSetTest {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void testRemove() {
|
public void testRemove() {
|
||||||
Map map = createStrictMock(Map.class);
|
Map map = createStrictMock(Map.class);
|
||||||
expect(map.remove("key")).andReturn(true);
|
expect(map.remove("key")).andReturn(true);
|
||||||
@ -71,7 +71,7 @@ public class MapBackedSetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||||
public void testAdd() {
|
public void testAdd() {
|
||||||
Map map = createStrictMock(Map.class);
|
Map map = createStrictMock(Map.class);
|
||||||
expect(map.put("key", true)).andReturn(null);
|
expect(map.put("key", true)).andReturn(null);
|
||||||
@ -84,7 +84,7 @@ public class MapBackedSetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void testClear() {
|
public void testClear() {
|
||||||
Map map = createStrictMock(Map.class);
|
Map map = createStrictMock(Map.class);
|
||||||
map.clear();
|
map.clear();
|
||||||
@ -95,7 +95,7 @@ public class MapBackedSetTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void testIterator() {
|
public void testIterator() {
|
||||||
Map map = createStrictMock(Map.class);
|
Map map = createStrictMock(Map.class);
|
||||||
Set keySet = createStrictMock(Set.class);
|
Set keySet = createStrictMock(Set.class);
|
||||||
|
Loading…
Reference in New Issue
Block a user