Remove unnecessary check in isBridgedCandidateFor()

In BridgeMethodResolver#isBridgedCandidateFor, candidateMethod is never
not bridged, so it's unnecessary to judge whether candidateMethod and
bridgeMethod are the same.

Closes gh-27862
This commit is contained in:
v_vyqyxiong
2022-01-11 14:03:57 +01:00
committed by Sam Brannen
parent b848acd86d
commit 6ecb488327
@@ -98,7 +98,7 @@ public final class BridgeMethodResolver {
* checks and can be used quickly filter for a set of possible matches.
*/
private static boolean isBridgedCandidateFor(Method candidateMethod, Method bridgeMethod) {
return (!candidateMethod.isBridge() && !candidateMethod.equals(bridgeMethod) &&
return (!candidateMethod.isBridge() &&
candidateMethod.getName().equals(bridgeMethod.getName()) &&
candidateMethod.getParameterCount() == bridgeMethod.getParameterCount());
}