File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
main/java/com/google/errorprone/bugpatterns/inlineme
test/java/com/google/errorprone/bugpatterns/inlineme Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ boolean isValidForValidator() {
102102
103103 enum InlineValidationErrorReason {
104104 NO_BODY ("InlineMe cannot be applied to abstract methods." ),
105- NOT_EXACTLY_ONE_STATEMENT ("InlineMe cannot inline methods with more than 1 statement." ),
105+ NOT_EXACTLY_ONE_STATEMENT ("InlineMe can only inline methods with exactly 1 statement." ),
106106 COMPLEX_STATEMENT (
107107 "InlineMe cannot inline complex statements. Consider using a different refactoring tool" ),
108108 CALLS_DEPRECATED_OR_PRIVATE_APIS (
Original file line number Diff line number Diff line change @@ -586,17 +586,13 @@ public void noOpMethod() {
586586 "RpcClient.java" ,
587587 """
588588 import com.google.errorprone.annotations.InlineMe;
589- import java.time.Duration;
590589
591590 public final class RpcClient {
592591 @InlineMe(replacement = "")
593592 @Deprecated
594- // BUG: Diagnostic contains: cannot inline methods with more than 1 statement
593+ // BUG: Diagnostic contains: only inline methods with exactly 1 statement
595594 public void setDeadline(org.joda.time.Duration deadline) {}
596-
597- public void setDeadline(Duration deadline) {}
598595 }
599-
600596 """ )
601597 .doTest ();
602598 }
@@ -892,7 +888,7 @@ public void after(int[] inputs) {}
892888 }
893889
894890 @ Test
895- public void emptyMethod () {
891+ public void returnVoidMethod () {
896892 helper
897893 .addSourceLines (
898894 "Client.java" ,
@@ -902,7 +898,7 @@ public void emptyMethod() {
902898 public final class Client {
903899 @Deprecated
904900 @InlineMe(replacement = "return")
905- // BUG: Diagnostic contains: no-op
901+ // BUG: Diagnostic contains: InlineMe cannot yet be applied to no-op void methods
906902 public void noOp() {
907903 return;
908904 }
You can’t perform that action at this time.
0 commit comments