aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core/src/test
diff options
context:
space:
mode:
authorPierre <pierre.guillot@sonarsource.com>2023-07-06 16:37:08 +0200
committersonartech <sonartech@sonarsource.com>2023-07-17 20:03:45 +0000
commita824f61c4c5bbe445df3d7bddfc26f14da95f3db (patch)
treef5633b9b677466bc8d66a75825651a8cb0a8803b /sonar-core/src/test
parent1716376a8e423d7811a031cff0210d89757ee8b1 (diff)
downloadsonarqube-a824f61c4c5bbe445df3d7bddfc26f14da95f3db.tar.gz
sonarqube-a824f61c4c5bbe445df3d7bddfc26f14da95f3db.zip
NO-JIRA replace MoreCollectors.toHashSet(size) with Collectors.toSet
Diffstat (limited to 'sonar-core/src/test')
-rw-r--r--sonar-core/src/test/java/org/sonar/core/util/stream/MoreCollectorsTest.java13
1 files changed, 0 insertions, 13 deletions
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 1dc511d2b64..fa4a9cc8cd5 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
@@ -40,7 +40,6 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.assertj.core.api.Assertions.entry;
import static org.sonar.core.util.stream.MoreCollectors.index;
import static org.sonar.core.util.stream.MoreCollectors.join;
-import static org.sonar.core.util.stream.MoreCollectors.toHashSet;
import static org.sonar.core.util.stream.MoreCollectors.uniqueIndex;
import static org.sonar.core.util.stream.MoreCollectors.unorderedFlattenIndex;
import static org.sonar.core.util.stream.MoreCollectors.unorderedIndex;
@@ -79,18 +78,6 @@ public class MoreCollectorsTest {
}
@Test
- public void toHashSet_with_size_builds_an_ArrayList() {
- Set<Integer> res = Stream.of(1, 2, 3, 4, 5).collect(toHashSet(30));
- assertThat(res).isInstanceOf(HashSet.class)
- .containsExactly(1, 2, 3, 4, 5);
- }
-
- @Test
- public void toHashSet_with_size_parallel_stream() {
- assertThat(HUGE_SET.parallelStream().collect(toHashSet(HUGE_SET.size()))).isEqualTo(HUGE_SET);
- }
-
- @Test
public void uniqueIndex_empty_stream_returns_empty_map() {
assertThat(Stream.<MyObj>empty().collect(uniqueIndex(MyObj::getId))).isEmpty();
assertThat(Stream.<MyObj>empty().collect(uniqueIndex(MyObj::getId, 6))).isEmpty();