Simplify and avoid complaints about "dead store to actual"
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1476852 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f2b49b393c
commit
90634a969a
|
@ -75,9 +75,7 @@ public class IteratorUtilsTest extends BulkTest {
|
||||||
assertTrue(expected > 0);
|
assertTrue(expected > 0);
|
||||||
|
|
||||||
// single use iterator
|
// single use iterator
|
||||||
for(@SuppressWarnings("unused") final Integer actual : iterable) {
|
assertFalse("should not be able to iterate twice", IteratorUtils.asIterable(iterator).iterator().hasNext());
|
||||||
fail("should not be able to iterate twice");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAsIterableNull() {
|
public void testAsIterableNull() {
|
||||||
|
@ -815,9 +813,7 @@ public class IteratorUtilsTest extends BulkTest {
|
||||||
assertTrue(expectedNodeIndex > 0);
|
assertTrue(expectedNodeIndex > 0);
|
||||||
|
|
||||||
// single use iterator
|
// single use iterator
|
||||||
for (@SuppressWarnings("unused") final Node actual : IteratorUtils.asIterable(iterator)) {
|
assertFalse("should not be able to iterate twice", IteratorUtils.asIterable(iterator).iterator().hasNext());
|
||||||
fail("should not be able to iterate twice");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Tests method nodeListIterator(Node)
|
* Tests method nodeListIterator(Node)
|
||||||
|
@ -840,9 +836,7 @@ public class IteratorUtilsTest extends BulkTest {
|
||||||
assertTrue(expectedNodeIndex > 0);
|
assertTrue(expectedNodeIndex > 0);
|
||||||
|
|
||||||
// single use iterator
|
// single use iterator
|
||||||
for (@SuppressWarnings("unused") final Node actual : IteratorUtils.asIterable(iterator)) {
|
assertFalse("should not be able to iterate twice", IteratorUtils.asIterable(iterator).iterator().hasNext());
|
||||||
fail("should not be able to iterate twice");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue