This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-beanutils.git
The following commit(s) were added to refs/heads/master by this push: new 5b3b695 Add elements of a collections without a loop. 5b3b695 is described below commit 5b3b6957059dee638e4e868d4b846e91a0bcc8d8 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Nov 20 12:37:32 2020 -0500 Add elements of a collections without a loop. --- .../apache/commons/beanutils2/converters/ArrayConverterTestCase.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/apache/commons/beanutils2/converters/ArrayConverterTestCase.java b/src/test/java/org/apache/commons/beanutils2/converters/ArrayConverterTestCase.java index 249385f..63dd65b 100644 --- a/src/test/java/org/apache/commons/beanutils2/converters/ArrayConverterTestCase.java +++ b/src/test/java/org/apache/commons/beanutils2/converters/ArrayConverterTestCase.java @@ -18,6 +18,7 @@ package org.apache.commons.beanutils2.converters; import java.lang.reflect.Array; import java.util.ArrayList; +import java.util.Collections; import java.util.Locale; import junit.framework.TestCase; @@ -283,9 +284,7 @@ public class ArrayConverterTestCase extends TestCase { // Test Data final String[] array = new String[] {"10", " 11", "12 ", " 13 "}; final ArrayList<String> list = new ArrayList<>(); - for (final String element : array) { - list.add(element); - } + Collections.addAll(list, array); // Expected results String msg = null;