This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 263ad7a5a5318d08b4cc976a6906185c7f91a02a Author: Paul King <[email protected]> AuthorDate: Wed Apr 30 21:07:24 2025 +1000 GROOVY-11596: minor refactor - improve consistency of return type --- .../java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java index 486da7544a..4563222781 100644 --- a/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java +++ b/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java @@ -17043,7 +17043,7 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport { // zip /** - * A collection of all the pairs of two Iterables. + * A list of all the pairs from two Iterables. * If the iterables are of different sizes, the result will have the same * size as the shorter one. * <p> @@ -17057,12 +17057,12 @@ public class DefaultGroovyMethods extends DefaultGroovyMethodsSupport { * * @param self an Iterable * @param other another Iterable - * @return a collection of all the pairs from self and other + * @return a list of all the pairs from self and other * @see #transpose(List) for zipping more than two lists * @since 5.0.0 */ - public static <U, V> Collection<Tuple2<U, V>> zip(Iterable<U> self, Iterable<V> other) { - Collection<Tuple2<U, V>> result = new ArrayList<>(); + public static <U, V> List<Tuple2<U, V>> zip(Iterable<U> self, Iterable<V> other) { + List<Tuple2<U, V>> result = new ArrayList<>(); addAll(result, zip(self.iterator(), other.iterator())); return result; }
