diff --git a/check_api/src/main/java/com/google/errorprone/fixes/SuggestedFixes.java b/check_api/src/main/java/com/google/errorprone/fixes/SuggestedFixes.java index ddd87e0b29c6..9d50d2160b95 100644 --- a/check_api/src/main/java/com/google/errorprone/fixes/SuggestedFixes.java +++ b/check_api/src/main/java/com/google/errorprone/fixes/SuggestedFixes.java @@ -755,7 +755,7 @@ public static SuggestedFix renameMethod(MethodTree tree, String replacement, Vis for (ErrorProneToken token : methodTokens) { if (token.kind() == TokenKind.IDENTIFIER && token.name().equals(tree.getName()) - && token.pos() >= returnTypeEndPos) { + && token.pos() > returnTypeEndPos) { return SuggestedFix.replace(token.pos(), token.endPos(), replacement); } }