Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeAvoidOverloadingProblems.java
2016-09-07 16:16:20 +03:00

30 lines
535 B
Java

// "Replace with lambda" "true"
import java.util.function.Supplier;
class A {
public <T> T runReadAction( final Supplier<T> computation) {
return null;
}
public <T, E extends Throwable> T runReadAction( ThrowableComputable<T, E> computation) throws E {
return null;
}
{
runReadAction(new Suppl<caret>ier<String>() {
@Override
public String get() {
return "";
}
});
}
}
@FunctionalInterface
interface ThrowableComputable<T, E extends Throwable> {
T compute() throws E;
}