Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<?, ExecutionContext> getVisitor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down