mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-13 05:46:59 -04:00
Add missing @SafeVarargs in Lang
This commit is contained in:
parent
e9b816fb87
commit
dcea76bcd3
@ -36,6 +36,7 @@ public final class Lang {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SafeVarargs
|
||||||
public static <K, V> Map<K, V> mapOf(Pair<K, V>... pairs) {
|
public static <K, V> Map<K, V> mapOf(Pair<K, V>... pairs) {
|
||||||
HashMap<K, V> map = new HashMap<>();
|
HashMap<K, V> map = new HashMap<>();
|
||||||
for (Pair<K, V> pair : pairs)
|
for (Pair<K, V> pair : pairs)
|
||||||
@ -323,6 +324,7 @@ public final class Lang {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SafeVarargs
|
||||||
public static <T> T nonNull(T... t) {
|
public static <T> T nonNull(T... t) {
|
||||||
for (T a : t) if (a != null) return a;
|
for (T a : t) if (a != null) return a;
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user