mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
lambda: stop at method if it's located inside lambda (IDEA-131087)
(cherry picked from commit 890ffa719208e467b1ba238d248dbbf102c71b76)
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.Arrays.stream;
|
||||
|
||||
class Test {
|
||||
public static Callable<Bar> foo(final String[] s) {
|
||||
return () -> new Bar() {
|
||||
@Override
|
||||
public Stream<Number> baz() {
|
||||
return zip(stream(s));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
interface Bar {
|
||||
Stream<Number> baz();
|
||||
}
|
||||
|
||||
|
||||
public static <L, O> Stream<O> zip(Stream<L> lefts) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Add Exception to Method Signature" "true"
|
||||
class C {
|
||||
interface I {
|
||||
void a() throws InterruptedException;
|
||||
}
|
||||
|
||||
{
|
||||
Callable<I> i = () -> {
|
||||
return new I() {
|
||||
public void a() throws InterruptedException {
|
||||
Thread.sleep(2000);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Add Exception to Method Signature" "true"
|
||||
class C {
|
||||
interface I {
|
||||
void a();
|
||||
}
|
||||
|
||||
{
|
||||
Callable<I> i = () -> {
|
||||
return new I() {
|
||||
public void a() {
|
||||
Thread.sl<caret>eep(2000);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user