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:
Sebastian Bazley 2013-04-28 22:59:14 +00:00
parent f2b49b393c
commit 90634a969a
1 changed files with 3 additions and 9 deletions

View File

@ -75,9 +75,7 @@ public class IteratorUtilsTest extends BulkTest {
assertTrue(expected > 0);
// single use iterator
for(@SuppressWarnings("unused") final Integer actual : iterable) {
fail("should not be able to iterate twice");
}
assertFalse("should not be able to iterate twice", IteratorUtils.asIterable(iterator).iterator().hasNext());
}
public void testAsIterableNull() {
@ -815,9 +813,7 @@ public class IteratorUtilsTest extends BulkTest {
assertTrue(expectedNodeIndex > 0);
// single use iterator
for (@SuppressWarnings("unused") final Node actual : IteratorUtils.asIterable(iterator)) {
fail("should not be able to iterate twice");
}
assertFalse("should not be able to iterate twice", IteratorUtils.asIterable(iterator).iterator().hasNext());
}
/**
* Tests method nodeListIterator(Node)
@ -840,9 +836,7 @@ public class IteratorUtilsTest extends BulkTest {
assertTrue(expectedNodeIndex > 0);
// single use iterator
for (@SuppressWarnings("unused") final Node actual : IteratorUtils.asIterable(iterator)) {
fail("should not be able to iterate twice");
}
assertFalse("should not be able to iterate twice", IteratorUtils.asIterable(iterator).iterator().hasNext());
}
/**