From b1712c2622c08c196885d7aeb322f2d5d9090139 Mon Sep 17 00:00:00 2001 From: Reflxction Dev Date: Sat, 14 Jan 2023 16:11:28 +0300 Subject: [PATCH] Add @SafeVarargs --- common/src/main/java/revxrsal/commands/util/Collections.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/revxrsal/commands/util/Collections.java b/common/src/main/java/revxrsal/commands/util/Collections.java index 6cea33cf..0bb2efb0 100644 --- a/common/src/main/java/revxrsal/commands/util/Collections.java +++ b/common/src/main/java/revxrsal/commands/util/Collections.java @@ -27,17 +27,18 @@ import java.util.*; -@SuppressWarnings("unchecked") public final class Collections { private Collections() {} + @SafeVarargs public static LinkedList linkedListOf(T... elements) { LinkedList list = new LinkedList<>(); java.util.Collections.addAll(list, elements); return list; } + @SafeVarargs public static List listOf(T... elements) { List list = new ArrayList<>(); java.util.Collections.addAll(list, elements);