mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
CollectMigration.NewListTerminal: support Guava collection constructors (IDEA-219934)
Also remove .distinct() automatically when unnecessary. GitOrigin-RevId: 504dd9e645f9492a4142c0793c42188912afdde9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
67862fe347
commit
2572c79c56
+9
@@ -0,0 +1,9 @@
|
||||
// "Fuse HashSet into the Stream API chain" "true"
|
||||
import java.util.*;
|
||||
import java.util.stream.*;
|
||||
|
||||
class X {
|
||||
void foo(Stream<String> s) {
|
||||
Set<String> set = s.collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Fuse newHashSet into the Stream API chain" "true"
|
||||
package com.google.common.collect;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.*;
|
||||
|
||||
class X {
|
||||
void foo(Stream<String> s) {
|
||||
Set<String> set = s.collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
|
||||
class Sets {
|
||||
public static native <E> HashSet<E> newHashSet(Iterable<? extends E> var0);
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Fuse HashSet into the Stream API chain" "true"
|
||||
import java.util.*;
|
||||
import java.util.stream.*;
|
||||
|
||||
class X {
|
||||
void foo(Stream<String> s) {
|
||||
Set<String> set = new HashSet<>(s.co<caret>llect(Collectors.toSet()));
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// "Fuse newHashSet into the Stream API chain" "true"
|
||||
package com.google.common.collect;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.*;
|
||||
|
||||
class X {
|
||||
void foo(Stream<String> s) {
|
||||
Set<String> set = Sets.newHashSet(s.co<caret>llect(Collectors.toSet()));
|
||||
}
|
||||
}
|
||||
|
||||
class Sets {
|
||||
public static native <E> HashSet<E> newHashSet(Iterable<? extends E> var0);
|
||||
}
|
||||
Reference in New Issue
Block a user