void () { // No highlighting because str was closed and we have ignoreResourcesWithClose option set doTest(""" import java.io.*; class X implements AutoCloseable { @Override public void close() {} static native X makeX(); } class Other { private static void example() { final X x = X.makeX(); x.close(); } }"""); }