You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2018/08/14 04:37:13 UTC

[2/2] commons-compress git commit: suppress "Possible heap pollution" warning

suppress "Possible heap pollution" warning


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/0326bd90
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/0326bd90
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/0326bd90

Branch: refs/heads/master
Commit: 0326bd90ac20652f1efd747a3c293a8110d109be
Parents: 356e100
Author: Stefan Bodewig <bo...@apache.org>
Authored: Tue Aug 14 06:35:56 2018 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Tue Aug 14 06:35:56 2018 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/commons/compress/utils/Sets.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/0326bd90/src/main/java/org/apache/commons/compress/utils/Sets.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/compress/utils/Sets.java b/src/main/java/org/apache/commons/compress/utils/Sets.java
index 2998120..0a7921b 100644
--- a/src/main/java/org/apache/commons/compress/utils/Sets.java
+++ b/src/main/java/org/apache/commons/compress/utils/Sets.java
@@ -41,7 +41,8 @@ public class Sets {
      * @param <E> type of elements contained in new set
      * @return A new HasSet
      */
-    public static <E> HashSet<E> newHashSet(@SuppressWarnings("unchecked") E... elements) {
+    @SafeVarargs
+    public static <E> HashSet<E> newHashSet(E... elements) {
         final HashSet<E> set = new HashSet<>(elements.length);
         Collections.addAll(set, elements);
         return set;