void () { addEnvironmentClass(""" package java.nio.file; import java.util.stream.Stream; public final class Files { public static Stream<String> lines(Path path) {return Stream.empty();} }"""); doTest(""" import java.io.*; import java.nio.file.Files; import java.util.stream.Stream; class X { private static void example(int a) throws IOException { Stream<String> s = Files.<warning descr="'Stream<String>' used without 'try'-with-resources statement">lines</warning>(null); } }"""); }