diff --git a/src/main/java/org/openrewrite/staticanalysis/SimplifyTernary.java b/src/main/java/org/openrewrite/staticanalysis/SimplifyTernary.java index a9871b867..934fbca70 100644 --- a/src/main/java/org/openrewrite/staticanalysis/SimplifyTernary.java +++ b/src/main/java/org/openrewrite/staticanalysis/SimplifyTernary.java @@ -19,11 +19,15 @@ import com.google.errorprone.refaster.annotation.BeforeTemplate; import org.openrewrite.java.template.RecipeDescriptor; +@RecipeDescriptor( + name = "Simplify ternary expressions", + description = "Simplifies various types of ternary expressions to improve code readability." +) public class SimplifyTernary { @RecipeDescriptor( - name = "Simplify ternary expressions", - description = "Simplify `expr ? true : false` to `expr`." + name = "Replace `booleanExpression ? true : false` with `booleanExpression`", + description = "Replace ternary expressions like `booleanExpression ? true : false` with `booleanExpression`." ) public static class SimplifyTernaryTrueFalse { @@ -39,8 +43,8 @@ boolean after(boolean expr) { } @RecipeDescriptor( - name = "Simplify ternary expressions", - description = "Simplify `expr ? false : true` to `!expr`." + name = "Replace `booleanExpression ? false : true` with `!booleanExpression`", + description = "Replace ternary expressions like `booleanExpression ? false : true` with `!booleanExpression`." ) public static class SimplifyTernaryFalseTrue {