diff --git a/src/main/java/org/openrewrite/staticanalysis/BooleanChecksNotInverted.java b/src/main/java/org/openrewrite/staticanalysis/BooleanChecksNotInverted.java index d152bd3549..a88e6f562e 100644 --- a/src/main/java/org/openrewrite/staticanalysis/BooleanChecksNotInverted.java +++ b/src/main/java/org/openrewrite/staticanalysis/BooleanChecksNotInverted.java @@ -34,8 +34,7 @@ public String getDisplayName() { @Override public String getDescription() { - return "It is needlessly complex to invert the result of a boolean comparison. The opposite comparison should be made instead. " - + "Also double negation of boolean expressions should be avoided."; + return "Ensures that boolean checks are not unnecessarily inverted. Also fixes double negative boolean expressions."; } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/RemoveToStringCallsFromArrayInstances.java b/src/main/java/org/openrewrite/staticanalysis/RemoveToStringCallsFromArrayInstances.java index dd13461e69..2810f7ca8f 100644 --- a/src/main/java/org/openrewrite/staticanalysis/RemoveToStringCallsFromArrayInstances.java +++ b/src/main/java/org/openrewrite/staticanalysis/RemoveToStringCallsFromArrayInstances.java @@ -56,7 +56,7 @@ public String getDisplayName() { @Override public String getDescription() { return "The result from `toString()` calls on arrays is largely useless. The output does not actually reflect" + - " the contents of the array. `Arrays.toString(array)` give the contents of the array."; + " the contents of the array. `Arrays.toString(array)` should be used instead as it gives the contents of the array."; } public TreeVisitor getVisitor() { diff --git a/src/main/java/org/openrewrite/staticanalysis/ReplaceWeekYearWithYear.java b/src/main/java/org/openrewrite/staticanalysis/ReplaceWeekYearWithYear.java index 6262fc2c97..ee13f6b11d 100644 --- a/src/main/java/org/openrewrite/staticanalysis/ReplaceWeekYearWithYear.java +++ b/src/main/java/org/openrewrite/staticanalysis/ReplaceWeekYearWithYear.java @@ -35,7 +35,7 @@ public String getDisplayName() { @Override public String getDescription() { return "For most dates Week Year (YYYY) and Year (yyyy) yield the same results. However, on the last week of" + - " December and first week of January Week Year could produce unexpected results."; + " December and the first week of January, Week Year could produce unexpected results."; } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanExpression.java b/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanExpression.java index 26b040411e..1025b48dd3 100644 --- a/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanExpression.java +++ b/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanExpression.java @@ -41,7 +41,7 @@ public String getDisplayName() { @Override public String getDescription() { - return "Checks for over-complicated boolean expressions. Finds code like `if (b == true)`, `b || true`, `!false`, etc."; + return "Checks for overly complicated boolean expressions, such as `if (b == true)`, `b || true`, `!false`, etc."; } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanReturn.java b/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanReturn.java index e72762c584..118455179d 100644 --- a/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanReturn.java +++ b/src/main/java/org/openrewrite/staticanalysis/SimplifyBooleanReturn.java @@ -44,7 +44,7 @@ public String getDisplayName() { @Override public String getDescription() { - return "Simplifies Boolean expressions by removing redundancies, e.g.: `a && true` simplifies to `a`."; + return "Simplifies Boolean expressions by removing redundancies. For example, `a && true` simplifies to `a`."; } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/SortedSetStreamToLinkedHashSet.java b/src/main/java/org/openrewrite/staticanalysis/SortedSetStreamToLinkedHashSet.java index 66ac67b078..c62a837c95 100644 --- a/src/main/java/org/openrewrite/staticanalysis/SortedSetStreamToLinkedHashSet.java +++ b/src/main/java/org/openrewrite/staticanalysis/SortedSetStreamToLinkedHashSet.java @@ -38,7 +38,7 @@ public String getDisplayName() { @Override public String getDescription() { - return "Correct 'set.stream().sorted().collect(Collectors.toSet())' to 'set.stream().sorted().collect(LinkedHashSet::new)'."; + return "Converts `set.stream().sorted().collect(Collectors.toSet())` to `set.stream().sorted().collect(LinkedHashSet::new)`."; } private static final MethodMatcher STREAM_COLLECT_METHOD_MATCHER = new MethodMatcher("java.util.stream.Stream collect(java.util.stream.Collector)"); diff --git a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryExplicitTypeArguments.java b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryExplicitTypeArguments.java index de7e805cc3..66dde6a1ab 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryExplicitTypeArguments.java +++ b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryExplicitTypeArguments.java @@ -31,7 +31,7 @@ public String getDisplayName() { @Override public String getDescription() { - return "When explicit type arguments are inferrable by the compiler, they may be removed."; + return "When explicit type arguments are inferable by the compiler, they may be removed."; } @Override diff --git a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryThrows.java b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryThrows.java index 9543be13e4..eb600b7a4d 100644 --- a/src/main/java/org/openrewrite/staticanalysis/UnnecessaryThrows.java +++ b/src/main/java/org/openrewrite/staticanalysis/UnnecessaryThrows.java @@ -38,12 +38,12 @@ public String getDisplayName() { @Override public String getDescription() { - return "Remove unnecessary `throws` declarations. This recipe will only remove unused, checked exception if:\n" + + return "Remove unnecessary `throws` declarations. This recipe will only remove unused, checked exceptions if:\n" + "\n" + "- The declaring class or the method declaration is `final`.\n" + "- The method declaration is `static` or `private`.\n" + - "- If the method overriding a method declaration in a super class and the super does not throw the exception.\n" + - "- If the method is `public` or `protected` and the exception is not documented via a JavaDoc as a `@throws` tag."; + "- The method overrides a method declaration in a super class and the super class does not throw the exception.\n" + + "- The method is `public` or `protected` and the exception is not documented via a JavaDoc as a `@throws` tag."; } @Override