mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
IDEA-156379 Suggested "collect(Collectors.toList())" ignores static Collectors import
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
import java.util.*;
|
||||
import static java.util.stream.Collectors.*;
|
||||
|
||||
class Foo {
|
||||
void m() {
|
||||
List<CharSequence> l = Arrays.asList("a", "b").stream().colle<caret>
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import java.util.*;
|
||||
import static java.util.stream.Collectors.*;
|
||||
|
||||
class Foo {
|
||||
void m() {
|
||||
List<CharSequence> l = Arrays.asList("a", "b").stream().collect(toList());<caret>
|
||||
}
|
||||
}
|
||||
+6
@@ -222,6 +222,12 @@ class Test88 {
|
||||
checkResultByFile(getTestName(false) + "_after.java")
|
||||
}
|
||||
|
||||
public void testStaticallyImportedCollectorsToList() {
|
||||
configureByTestName()
|
||||
selectItem(myItems.find { it.lookupString.contains('collect(toList())') })
|
||||
checkResultByFile(getTestName(false) + "_after.java")
|
||||
}
|
||||
|
||||
public void testAllCollectors() {
|
||||
configureByTestName()
|
||||
myFixture.assertPreferredCompletionItems 0, 'collect', 'collect', 'collect(Collectors.toCollection())', 'collect(Collectors.toList())', 'collect(Collectors.toSet())'
|
||||
|
||||
Reference in New Issue
Block a user