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