Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Apache Commons StringUtils refaster template replacements (#271)
* Add Apache Commons StringUtils refaster template replacements * Add missing import * Fix import in test * Fix import in test * Rename recipe since package already includes Apache Commons * Show _once_ that static imports work too * Format fix * initial commit * updated tests * added a couple more tests and recipe * more tests and recipes * more recipes, all moved into one class * updated license headers * small fix * Update src/main/java/org/openrewrite/java/migrate/apache/commons/lang/ApacheCommonsStringUtils.java Co-authored-by: Tim te Beek <tim@moderne.io> * made changes from PR feedback * used `regionMatches()` for `EndsWithIgnoreCase` * Fix one test, disable another * Always run all ApacheCommonsStringUtilsRecipes * fixed old templates, made some new templates and created more tests * finished adding refaster template classes for all possible methods * sorted refaster templates alphabetically * Update src/main/java/org/openrewrite/java/migrate/apache/commons/lang/ApacheCommonsStringUtils.java Co-authored-by: Knut Wannheden <knut@moderne.io> * Update src/main/java/org/openrewrite/java/migrate/apache/commons/lang/ApacheCommonsStringUtils.java Co-authored-by: Knut Wannheden <knut@moderne.io> * Update build.gradle.kts Co-authored-by: Tim te Beek <tim@moderne.io> * Update src/main/java/org/openrewrite/java/migrate/apache/commons/lang/ApacheCommonsStringUtils.java Co-authored-by: Knut Wannheden <knut@moderne.io> * null checked all templates * commented out templates that I am not sure are accurate replacements yet, added new test to cover in future * Fix uberTest execution and expected values * Minor fixes to some of the patterns * Verify there's no change yet in additional cases * Add parentheses around replacement templates that need it * Test that input methods are not called twice * Swap case should also use parentheses * Fix rules Abbreviate through EqualsIgnoreCase * Disable inputMethodsNotCalledTwice; tracked separately * Check Equals through Lowercase * Fix RemoveEnd * Fix Replace and Split * Disable with note broken recipes * Disable Uncapitalize * Update build.gradle.kts --------- Co-authored-by: Tim te Beek <tim@moderne.io> Co-authored-by: Knut Wannheden <knut@moderne.io>
- Loading branch information