summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2016-07-21 18:45:27 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2016-07-26 18:58:17 +0900
commit0d872a083700f6e8153069b656d28eb7b7e2e1ec (patch)
tree4397d6a1a156c2ae0eb3e175d10124457792b000 /org.eclipse.jgit.test
parenteb7a93bb2a01206e9d71c59963be2a7a9adf0411 (diff)
downloadjgit-0d872a083700f6e8153069b656d28eb7b7e2e1ec.tar.gz
jgit-0d872a083700f6e8153069b656d28eb7b7e2e1ec.zip
Annotate Sets#of with @SafeVarArgs to prevent heap pollution warning
This prevents the warning: Potential heap pollution via varargs parameter The method doesn't do any casting of types that would cause the heap pollution, so it should be safe to add @SafeVarArgs. See [1] for information about this warning. [1] http://stackoverflow.com/a/12462259/381622 Change-Id: Ic6d252915ea44b4f1c385afecb98906cd2c54382 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java1
1 files changed, 1 insertions, 0 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 731685731b..4454e1a393 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
@@ -47,6 +47,7 @@ import java.util.HashSet;
import java.util.Set;
public class Sets {
+ @SafeVarargs
public static <T> Set<T> of(T... elements) {
Set<T> ret = new HashSet<T>();
for (T element : elements)