void () { doTest(""" import java.io.*; class X { private static void example(Object o) throws IOException { InputStream is = o.getClass().<warning descr="'InputStream' used without 'try'-with-resources statement">getResourceAsStream</warning>(""); InputStream is2 = test(is); } static <T> T test(T t) { return t; } }"""); }