2287 |
2287 |
2288 if (sitesym != null && |
2288 if (sitesym != null && |
2289 sitesym.kind == VAR && |
2289 sitesym.kind == VAR && |
2290 ((VarSymbol)sitesym).isResourceVariable() && |
2290 ((VarSymbol)sitesym).isResourceVariable() && |
2291 sym.kind == MTH && |
2291 sym.kind == MTH && |
|
2292 sym.name.equals(names.close) && |
2292 sym.overrides(syms.autoCloseableClose, sitesym.type.tsym, types, true) && |
2293 sym.overrides(syms.autoCloseableClose, sitesym.type.tsym, types, true) && |
2293 env.info.lint.isEnabled(LintCategory.TRY)) { |
2294 env.info.lint.isEnabled(LintCategory.TRY)) { |
2294 log.warning(LintCategory.TRY, tree, "try.explicit.close.call"); |
2295 log.warning(LintCategory.TRY, tree, "try.explicit.close.call"); |
2295 } |
2296 } |
2296 |
2297 |