From 2fc829ec53beb33d212b977c4f96f29d3ac0eaa7 Mon Sep 17 00:00:00 2001 From: Kurt Alfred Kluever Date: Mon, 24 Jan 2022 08:08:18 -0800 Subject: [PATCH] Tweak and improve InlineMe CL automated descriptions. PiperOrigin-RevId: 423817727 --- .../google/errorprone/bugpatterns/inlineme/Inliner.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/inlineme/Inliner.java b/core/src/main/java/com/google/errorprone/bugpatterns/inlineme/Inliner.java index 5c759206b95..e458d6cf4f6 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/inlineme/Inliner.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/inlineme/Inliner.java @@ -311,9 +311,10 @@ static Api create(MethodSymbol method, VisitorState state) { abstract String extraMessage(); final String message() { - return shortName() - + (isDeprecated() ? " is deprecated and" : "") - + " should be inlined" + return "Migrate (via inlining) from " + + (isDeprecated() ? "deprecated " : "") + + shortName() + + " to its replacement" + extraMessage(); }