void () { doTest( """ class AutoCloseableSample { public OAuth2AccessToken authenticateOAuth(String code) { OAuth20Service service = <warning descr="'OAuth20Service' used without 'try'-with-resources statement">makeOAuth2Service</warning>(); try { return service.getAccessToken(code); } catch (RuntimeException e) { return null; } } native OAuth20Service makeOAuth2Service(); private static class OAuth2AccessToken {} private static class OAuth20Service implements AutoCloseable { native public OAuth2AccessToken getAccessToken(String code); @Override public void close() {} } }"""); }