Skip to content

Commit

Permalink
change compare order
Browse files Browse the repository at this point in the history
  • Loading branch information
oxkitsune committed Aug 9, 2023
1 parent 75e8ef5 commit 36d3796
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,8 @@ public static SuggestedFix renameMethod(MethodTree tree, String replacement, Vis
int returnTypeEndPos = state.getEndPosition(tree.getReturnType());
for (ErrorProneToken token : methodTokens) {
if (token.kind() == TokenKind.IDENTIFIER
&& token.name().equals(tree.getName())
&& token.pos() > returnTypeEndPos) {
&& token.pos() > returnTypeEndPos
&& token.name().equals(tree.getName())) {
return SuggestedFix.replace(token.pos(), token.endPos(), replacement);
}
}
Expand Down

0 comments on commit 36d3796

Please sign in to comment.