7032633: javac -Xlint:all warns about flush() within try on an auto-closeable resource

Missing name check before calling MethodSymbol.overrides causes wrong warnings to be issued

Reviewed-by: jjg
2 files changed