Skip to content

Commit

Permalink
Remove unnecessary check in isBridgedCandidateFor()
Browse files Browse the repository at this point in the history
In BridgeMethodResolver#isBridgedCandidateFor, candidateMethod is never
not bridged, so it's unnecessary to judge whether candidateMethod and
bridgeMethod are the same.

Closes gh-27862
  • Loading branch information
v_vyqyxiong authored and sbrannen committed Jan 11, 2022
1 parent b848acd commit 6ecb488
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -98,7 +98,7 @@ public static Method findBridgedMethod(Method bridgeMethod) {
* 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());
}
Expand Down

0 comments on commit 6ecb488

Please sign in to comment.