javac gather lists of applicable and inapplicable candidates during overload resolution. There are no checks being done to restrict the addition of new members to those lists. For example it doesn't make sense to add a candidate method that is overridden by a method that is already in the list, or to add duplicate methods. But these lists are very permissive basically for performance reasons.
If javac determines that there is no applicable method for a given invocation, then a curated list of inapplicable methods should be shown to the user. Currently duplicates are removed but overridden methods should be removed too, this last part is missing.
The issue has been reported at [1] and a patch to fix it at [2]
[1] http://mail.openjdk.java.net/pipermail/compiler-dev/2017-September/011061.html
[2] http://mail.openjdk.java.net/pipermail/compiler-dev/2017-September/011075.html
If javac determines that there is no applicable method for a given invocation, then a curated list of inapplicable methods should be shown to the user. Currently duplicates are removed but overridden methods should be removed too, this last part is missing.
The issue has been reported at [1] and a patch to fix it at [2]
[1] http://mail.openjdk.java.net/pipermail/compiler-dev/2017-September/011061.html
[2] http://mail.openjdk.java.net/pipermail/compiler-dev/2017-September/011075.html