summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
authorCarsten Hammer <carsten.hammer@t-online.de>2019-04-06 20:42:38 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-04-14 00:19:51 +0200
commit0b320b2c357a02d1f7306cb572e09917a4ec59d9 (patch)
treee70d0265c538e9f284023d7fe177d0ddca5c67b8 /org.eclipse.jgit.test/tst
parent39b0b51b1253f569888db3578b01708a14360b69 (diff)
downloadjgit-0b320b2c357a02d1f7306cb572e09917a4ec59d9.tar.gz
jgit-0b320b2c357a02d1f7306cb572e09917a4ec59d9.zip
Use Arrays.asList instead of copying array in a for loop
Change-Id: Ie44950f7d2f2f94a0412efb6c274f6e1e31efcd6 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java
index 1d9cd78140..d6aead4a52 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/TreeWalkAttributeTest.java
@@ -49,6 +49,7 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@@ -854,8 +855,7 @@ public class TreeWalkAttributeTest extends RepositoryTestCase {
static Set<Attribute> asSet(Attribute... attrs) {
HashSet<Attribute> result = new HashSet<>();
- for (Attribute attr : attrs)
- result.add(attr);
+ result.addAll(Arrays.asList(attrs));
return result;
}