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
2021-12-28 14:59:23 +08:00
committed by Sam Brannen
parent b848acd86d
commit 6ecb488327

View File

@@ -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());
}