mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
StreamToLoopInspection: disable elements which type is PsiIntersection type or PsiImmediateClassType which is not resolvable in outer context (fixes EA-97901); better diagnostic for cases like EA-97901
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// "Replace Stream API chain with loop" "false"
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Test {
|
||||
interface A {void a();}
|
||||
interface B {void b();}
|
||||
|
||||
public void test(Object obj) {
|
||||
Stream.of((A & B) obj).fo<caret>rEach(B::b);
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Replace Stream API chain with loop" "false"
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Main {
|
||||
public void test2(List<? extends CharSequence> list) {
|
||||
list.stream().map(String::length).for<caret>Each(System.out::println);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user