diff options
author | Pierre <pierre.guillot@sonarsource.com> | 2023-07-06 16:12:30 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-07-17 20:03:44 +0000 |
commit | a0f29cb5c393c912f45c4d4e7f4c8a5679162b0d (patch) | |
tree | 4dd5c0622c70c639dac142701aa3cbcb45eb5e86 /sonar-core | |
parent | 5737b08804feb53257e712443b2eb69ab4607f47 (diff) | |
download | sonarqube-a0f29cb5c393c912f45c4d4e7f4c8a5679162b0d.tar.gz sonarqube-a0f29cb5c393c912f45c4d4e7f4c8a5679162b0d.zip |
NO-JIRA replace MoreCollectors.toList with Collectors.toList
Diffstat (limited to 'sonar-core')
-rw-r--r-- | sonar-core/src/main/java/org/sonar/core/util/stream/MoreCollectors.java | 4 | ||||
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/util/stream/MoreCollectorsTest.java | 6 |
2 files changed, 0 insertions, 10 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/util/stream/MoreCollectors.java b/sonar-core/src/main/java/org/sonar/core/util/stream/MoreCollectors.java index a7d736e292e..ed82847db26 100644 --- a/sonar-core/src/main/java/org/sonar/core/util/stream/MoreCollectors.java +++ b/sonar-core/src/main/java/org/sonar/core/util/stream/MoreCollectors.java @@ -52,10 +52,6 @@ public final class MoreCollectors { // prevents instantiation } - public static <T> Collector<T, ?, List<T>> toList() { - return Collectors.toList(); - } - public static <E> Collector<E, ?, ImmutableList<E>> toImmutableList() { return ImmutableList.toImmutableList(); } diff --git a/sonar-core/src/test/java/org/sonar/core/util/stream/MoreCollectorsTest.java b/sonar-core/src/test/java/org/sonar/core/util/stream/MoreCollectorsTest.java index e880fd4facc..55d104a48af 100644 --- a/sonar-core/src/test/java/org/sonar/core/util/stream/MoreCollectorsTest.java +++ b/sonar-core/src/test/java/org/sonar/core/util/stream/MoreCollectorsTest.java @@ -47,7 +47,6 @@ import static org.sonar.core.util.stream.MoreCollectors.toArrayList; import static org.sonar.core.util.stream.MoreCollectors.toHashSet; import static org.sonar.core.util.stream.MoreCollectors.toImmutableList; import static org.sonar.core.util.stream.MoreCollectors.toImmutableSet; -import static org.sonar.core.util.stream.MoreCollectors.toList; import static org.sonar.core.util.stream.MoreCollectors.toSet; import static org.sonar.core.util.stream.MoreCollectors.uniqueIndex; import static org.sonar.core.util.stream.MoreCollectors.unorderedFlattenIndex; @@ -81,11 +80,6 @@ public class MoreCollectorsTest { } @Test - public void toList_parallel_stream() { - assertThat(HUGE_LIST.parallelStream().collect(toList())).isEqualTo(HUGE_LIST); - } - - @Test public void toList_with_size_builds_an_ImmutableList() { List<Integer> res = Stream.of(1, 2, 3, 4, 5).collect(toImmutableList()); assertThat(res).isInstanceOf(ImmutableList.class) |