summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/src/org/eclipse/jgit
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/src/org/eclipse/jgit
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/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java b/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java
index 5a01eae9b5..e6100e225d 100644
--- a/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java
+++ b/org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java
@@ -43,6 +43,7 @@
package org.eclipse.jgit.lib;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
@@ -50,8 +51,7 @@ public class Sets {
@SafeVarargs
public static <T> Set<T> of(T... elements) {
Set<T> ret = new HashSet<>();
- for (T element : elements)
- ret.add(element);
+ ret.addAll(Arrays.asList(elements));
return ret;
}
}