avoid checks over not applicable methods (IDEA-156196)

This commit is contained in:
Anna.Kozlova
2016-05-19 16:47:28 +02:00
parent 18e4b2842b
commit 25352dce0b
3 changed files with 39 additions and 3 deletions
@@ -0,0 +1,31 @@
import java.io.IOException;
import java.util.List;
class Reproduction
{
public static List<Reproduction> a() throws IOException {
return exe(connection -> {
Object stmt = null;
return st(Reproduction.class, 1, "");
});
}
public static List<Reproduction> b() throws IOException {
return exe(connection -> {
return st(Reproduction.class, 1, "");
});
}
static <K> List<K> st(Class<K> c, Object... o) throws IOException {
return null;
}
static <V> V exe(VFunction<V> vFunction) throws IOException {
return vFunction.apply("");
}
interface VFunction<V> {
V apply(String s) throws IOException;
}
}