mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
21 lines
460 B
Java
21 lines
460 B
Java
// "Replace with lambda" "true-preview"
|
|
class A {
|
|
{
|
|
bar(new Throwabl<caret>eComputable<String, Exception>() {
|
|
@Override
|
|
public String compute() throws Exception {
|
|
return foo();
|
|
}
|
|
});
|
|
}
|
|
|
|
private <T> void bar(ThrowableComputable<T, Exception> throwableComputable) {}
|
|
|
|
private <K> K foo() throws Exception {
|
|
return null;
|
|
}
|
|
|
|
interface ThrowableComputable<T, T1 extends Throwable> {
|
|
T compute() throws T1;
|
|
}
|
|
} |