diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java index 5918e8c7ab..a4d9d86147 100644 --- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java +++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java @@ -716,7 +716,7 @@ public static void forEach(final Iterator iterator, final Closure E forEachButLast(final Iterator iterator, final Closure... closures) { @Override public void execute(final E input) { for (final Closure iClosure : iClosures) { - iClosure.execute(input); + iClosure.accept(input); } } diff --git a/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java b/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java index 6bd24e8b88..f329e5e871 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java +++ b/src/main/java/org/apache/commons/collections4/functors/ClosureTransformer.java @@ -76,7 +76,7 @@ public Closure getClosure() { */ @Override public T transform(final T input) { - iClosure.execute(input); + iClosure.accept(input); return input; } diff --git a/src/main/java/org/apache/commons/collections4/functors/ForClosure.java b/src/main/java/org/apache/commons/collections4/functors/ForClosure.java index 766b2d3e38..907d6e80aa 100644 --- a/src/main/java/org/apache/commons/collections4/functors/ForClosure.java +++ b/src/main/java/org/apache/commons/collections4/functors/ForClosure.java @@ -78,7 +78,7 @@ public ForClosure(final int count, final Closure closure) { @Override public void execute(final E input) { for (int i = 0; i < iCount; i++) { - iClosure.execute(input); + iClosure.accept(input); } } diff --git a/src/main/java/org/apache/commons/collections4/functors/IfClosure.java b/src/main/java/org/apache/commons/collections4/functors/IfClosure.java index 17a1fd3490..277981593a 100644 --- a/src/main/java/org/apache/commons/collections4/functors/IfClosure.java +++ b/src/main/java/org/apache/commons/collections4/functors/IfClosure.java @@ -113,9 +113,9 @@ public IfClosure(final Predicate predicate, final Closure @Override public void execute(final E input) { if (iPredicate.evaluate(input)) { - iTrueClosure.execute(input); + iTrueClosure.accept(input); } else { - iFalseClosure.execute(input); + iFalseClosure.accept(input); } } diff --git a/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java b/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java index 9a6b906e48..1b5013f6ec 100644 --- a/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java +++ b/src/main/java/org/apache/commons/collections4/functors/SwitchClosure.java @@ -143,11 +143,11 @@ public SwitchClosure(final Predicate[] predicates, final Closure predicate, final Closure