Skip to content

Commit

Permalink
Add missing spaces.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cpovirk authored and Error Prone Team committed Nov 19, 2024
1 parent 2d87dcf commit 7615a6d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7615a6d

Please sign in to comment.