Remove unnecessary casts.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1429892 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
af2d6e62f3
commit
12d9e8743d
|
@ -105,8 +105,8 @@ public class ByteArrayKeyAnalyzer extends AbstractKeyAnalyzer<byte[]> {
|
|||
return false;
|
||||
}
|
||||
|
||||
int index = (int)(keyBitIndex / LENGTH);
|
||||
int bit = (int)(keyBitIndex % LENGTH);
|
||||
int index = keyBitIndex / LENGTH;
|
||||
int bit = keyBitIndex % LENGTH;
|
||||
return (key[index] & mask(bit)) != 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -131,8 +131,8 @@ public class CharArrayKeyAnalyzer extends AbstractKeyAnalyzer<char[]> {
|
|||
return false;
|
||||
}
|
||||
|
||||
int index = (int)(bitIndex / LENGTH);
|
||||
int bit = (int)(bitIndex % LENGTH);
|
||||
int index = bitIndex / LENGTH;
|
||||
int bit = bitIndex % LENGTH;
|
||||
|
||||
return (key[index] & mask(bit)) != 0;
|
||||
}
|
||||
|
|
|
@ -131,8 +131,8 @@ public class StringKeyAnalyzer extends AbstractKeyAnalyzer<String> {
|
|||
return false;
|
||||
}
|
||||
|
||||
int index = (int)(bitIndex / LENGTH);
|
||||
int bit = (int)(bitIndex % LENGTH);
|
||||
int index = bitIndex / LENGTH;
|
||||
int bit = bitIndex % LENGTH;
|
||||
|
||||
return (key.charAt(index) & mask(bit)) != 0;
|
||||
}
|
||||
|
|
|
@ -914,7 +914,7 @@ public class CollectionUtilsTest extends MockTestCase {
|
|||
ints.add(3);
|
||||
Iterable<Integer> iterable = ints;
|
||||
assertTrue(CollectionUtils.filter(iterable, EQUALS_TWO));
|
||||
assertEquals(1, (int) ints.size());
|
||||
assertEquals(1, ints.size());
|
||||
assertEquals(2, (int) ints.get(0));
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public class IndexedCollectionTest extends AbstractCollectionTest<String> {
|
|||
|
||||
@Override
|
||||
public String[] getFullElements() {
|
||||
return (String[]) new String[] { "1", "3", "5", "7", "2", "4", "6" };
|
||||
return new String[] { "1", "3", "5", "7", "2", "4", "6" };
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -78,13 +78,13 @@ public class MultiValueMapTest<K, V> extends AbstractObjectTest {
|
|||
@SuppressWarnings("unchecked")
|
||||
public void testKeyContainsValue() {
|
||||
final MultiValueMap<K, V> map = createTestMap(HashSet.class);
|
||||
assertTrue(map.containsValue((K) "one", "uno"));
|
||||
assertTrue(map.containsValue((K) "one", "un"));
|
||||
assertTrue(map.containsValue((K) "two", "dos"));
|
||||
assertTrue(map.containsValue((K) "two", "deux"));
|
||||
assertTrue(map.containsValue((K) "three", "tres"));
|
||||
assertTrue(map.containsValue((K) "three", "trois"));
|
||||
assertFalse(map.containsValue((K) "four", "quatro"));
|
||||
assertTrue(map.containsValue("one", "uno"));
|
||||
assertTrue(map.containsValue("one", "un"));
|
||||
assertTrue(map.containsValue("two", "dos"));
|
||||
assertTrue(map.containsValue("two", "deux"));
|
||||
assertTrue(map.containsValue("three", "tres"));
|
||||
assertTrue(map.containsValue("three", "trois"));
|
||||
assertFalse(map.containsValue("four", "quatro"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
Loading…
Reference in New Issue