A collection of String rules

MSAL

A collection of rules for refactoring methods called on String instances in Java code.

org.openrewrite.java.migrate.lang.StringRulesRecipes
mod run . --recipe=org.openrewrite.java.migrate.lang.StringRulesRecipes

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Replace redundant String method calls with self
  2. Replace String.indexOf(String, 0) with String.indexOf(String)
  3. Replace String.indexOf(char, 0) with String.indexOf(char)
  4. Replace lower and upper case String comparisons with String.equalsIgnoreCase(String)