1 | package pl.zankowski.iextrading4j.api.util; | |
2 | ||
3 | import com.google.common.collect.ImmutableSet; | |
4 | ||
5 | import java.util.Collection; | |
6 | import java.util.Set; | |
7 | ||
8 | public class SetUtil { | |
9 | ||
10 | private SetUtil() {} | |
11 | ||
12 | public static <T> Set<T> immutableSet(final Collection<? extends T> elements) { | |
13 |
2
1. immutableSet : negated conditional → KILLED 2. immutableSet : replaced return value with Collections.emptySet for pl/zankowski/iextrading4j/api/util/SetUtil::immutableSet → KILLED |
return elements == null |
14 | ? ImmutableSet.of() | |
15 | : ImmutableSet.copyOf(elements); | |
16 | } | |
17 | ||
18 | } | |
Mutations | ||
13 |
1.1 2.2 |