Skip to content

Commit 6ecb488

Browse files
v_vyqyxiongsbrannen
v_vyqyxiong
authored andcommitted
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
1 parent b848acd commit 6ecb488

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/core/BridgeMethodResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public static Method findBridgedMethod(Method bridgeMethod) {
9898
* checks and can be used quickly filter for a set of possible matches.
9999
*/
100100
private static boolean isBridgedCandidateFor(Method candidateMethod, Method bridgeMethod) {
101-
return (!candidateMethod.isBridge() && !candidateMethod.equals(bridgeMethod) &&
101+
return (!candidateMethod.isBridge() &&
102102
candidateMethod.getName().equals(bridgeMethod.getName()) &&
103103
candidateMethod.getParameterCount() == bridgeMethod.getParameterCount());
104104
}

0 commit comments

Comments
 (0)