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

25 lines
454 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((Supplier<String>) () -> "");
}
}
@FunctionalInterface
interface ThrowableComputable<T, E extends Throwable> {
T compute() throws E;
}