Skip to content

Commit

Permalink
Only use static imports for JUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Oct 21, 2024
1 parent f7ae172 commit e5c8050
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.commons.collections4.iterators;

import static org.apache.commons.collections4.functors.TruePredicate.truePredicate;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand All @@ -31,6 +30,7 @@

import org.apache.commons.collections4.Predicate;
import org.apache.commons.collections4.functors.NotNullPredicate;
import org.apache.commons.collections4.functors.TruePredicate;
import org.apache.commons.lang3.ArrayUtils;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -160,7 +160,7 @@ public void testSetIterator() {
final Iterator<E> iter2 = Collections.<E>emptyList().iterator();

final FilterIterator<E> filterIterator = new FilterIterator<>(iter1);
filterIterator.setPredicate(truePredicate());
filterIterator.setPredicate(TruePredicate.truePredicate());
// this iterator has elements
assertTrue(filterIterator.hasNext());

Expand All @@ -178,7 +178,7 @@ public void testSetPredicate() {
final Iterator<E> iter = Collections.singleton((E) null).iterator();

final FilterIterator<E> filterIterator = new FilterIterator<>(iter);
filterIterator.setPredicate(truePredicate());
filterIterator.setPredicate(TruePredicate.truePredicate());
// this predicate matches
assertTrue(filterIterator.hasNext());

Expand Down

0 comments on commit e5c8050

Please sign in to comment.