From 7615a6d126225ec60d5ba7fc153decd7886aedec Mon Sep 17 00:00:00 2001 From: cpovirk Date: Tue, 19 Nov 2024 06:32:07 -0800 Subject: [PATCH] Add missing spaces. Of course one might ask if we should consider using text blocks here :) Then: - We might put the whole description on one very long line. - We might wrap around 100 columns and escape the newlines. - We might use _unescaped_ newlines but configure Error Prone to replace all newlines with spaces internally. (We could in theory even give google-java-format special knowledge of `@BugPattern` so that it could wrap automatically.) (And in all that, we have the option to outdent the text block or not.) PiperOrigin-RevId: 697993965 --- .../bugpatterns/UnsafeReflectiveConstructionCast.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/UnsafeReflectiveConstructionCast.java b/core/src/main/java/com/google/errorprone/bugpatterns/UnsafeReflectiveConstructionCast.java index 6f907c0c361..db18b9e1203 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/UnsafeReflectiveConstructionCast.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/UnsafeReflectiveConstructionCast.java @@ -46,8 +46,8 @@ summary = "Prefer `asSubclass` instead of casting the result of `newInstance`," + " to detect classes of incorrect type before invoking their constructors." - + "This way, if the class is of the incorrect type," - + "it will throw an exception before invoking its constructor.", + + " This way, if the class is of the incorrect type," + + " it will throw an exception before invoking its constructor.", severity = WARNING, tags = StandardTags.FRAGILE_CODE) public class UnsafeReflectiveConstructionCast extends BugChecker implements TypeCastTreeMatcher {