Casts away

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1353219 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-06-24 01:27:22 +00:00
parent 43a7d2aa27
commit 9979f0c493
4 changed files with 4 additions and 4 deletions

View File

@ -254,7 +254,7 @@ public class TestCollatingIterator extends AbstractTestIterator<Integer> {
CollatingIterator<Integer> collatingIterator2 = new CollatingIterator<Integer>(null, l1.iterator(), l2.iterator()); CollatingIterator<Integer> collatingIterator2 = new CollatingIterator<Integer>(null, l1.iterator(), l2.iterator());
collatingIterator2.setComparator(new ComparableComparator<Integer>()); collatingIterator2.setComparator(new ComparableComparator<Integer>());
for ( ; collatingIterator2.hasNext(); i++ ) { for ( ; collatingIterator2.hasNext(); i++ ) {
Integer n = (Integer)collatingIterator2.next(); Integer n = collatingIterator2.next();
assertEquals("wrong order", (int)n, i + 1); assertEquals("wrong order", (int)n, i + 1);
} }
assertEquals("wrong size", i, l1.size() + l2.size()); assertEquals("wrong size", i, l1.size() + l2.size());

View File

@ -51,7 +51,7 @@ public class TestListOrderedMap<K, V> extends AbstractTestOrderedMap<K, V> {
@Override @Override
public ListOrderedMap<K, V> makeObject() { public ListOrderedMap<K, V> makeObject() {
return (ListOrderedMap<K, V>) ListOrderedMap.listOrderedMap(new HashMap<K, V>()); return ListOrderedMap.listOrderedMap(new HashMap<K, V>());
} }
/** /**

View File

@ -42,7 +42,7 @@ public class TestPredicatedSet<E> extends AbstractTestSet<E> {
protected Predicate<E> truePredicate = TruePredicate.<E>truePredicate(); protected Predicate<E> truePredicate = TruePredicate.<E>truePredicate();
protected PredicatedSet<E> decorateSet(Set<E> set, Predicate<? super E> predicate) { protected PredicatedSet<E> decorateSet(Set<E> set, Predicate<? super E> predicate) {
return (PredicatedSet<E>) PredicatedSet.predicatedSet(set, predicate); return PredicatedSet.predicatedSet(set, predicate);
} }
@Override @Override

View File

@ -72,7 +72,7 @@ public class TestPredicatedSortedSet<E> extends AbstractTestSortedSet<E> {
}; };
protected PredicatedSortedSet<E> makeTestSet() { protected PredicatedSortedSet<E> makeTestSet() {
return (PredicatedSortedSet<E>) PredicatedSortedSet.predicatedSortedSet(new TreeSet<E>(), testPredicate); return PredicatedSortedSet.predicatedSortedSet(new TreeSet<E>(), testPredicate);
} }
public void testGetSet() { public void testGetSet() {