Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Apache Commons StringUtils refaster template replacements #271

Merged
merged 44 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
dc71bce
Add Apache Commons StringUtils refaster template replacements
timtebeek Aug 10, 2023
b462f08
Add missing import
timtebeek Aug 10, 2023
6909bea
Fix import in test
timtebeek Aug 10, 2023
0c612c6
Fix import in test
timtebeek Aug 10, 2023
7568acc
Rename recipe since package already includes Apache Commons
timtebeek Aug 10, 2023
6d2bb7b
Show _once_ that static imports work too
timtebeek Aug 10, 2023
129aa9a
Format fix
timtebeek Aug 10, 2023
156c6f5
initial commit
AlekSimpson Aug 10, 2023
9519cb0
updated tests
AlekSimpson Aug 11, 2023
c392897
added a couple more tests and recipe
AlekSimpson Aug 11, 2023
54199e1
more tests and recipes
AlekSimpson Aug 11, 2023
be89223
more recipes, all moved into one class
AlekSimpson Aug 11, 2023
a1bb548
updated license headers
AlekSimpson Aug 11, 2023
1c77e3b
small fix
AlekSimpson Aug 11, 2023
b8c597a
Update src/main/java/org/openrewrite/java/migrate/apache/commons/lang…
AlekSimpson Aug 14, 2023
803afad
made changes from PR feedback
AlekSimpson Aug 14, 2023
b4b4e67
used `regionMatches()` for `EndsWithIgnoreCase`
AlekSimpson Aug 14, 2023
e36b41c
Fix one test, disable another
timtebeek Aug 14, 2023
fb16349
Always run all ApacheCommonsStringUtilsRecipes
timtebeek Aug 14, 2023
d49b70e
fixed old templates, made some new templates and created more tests
AlekSimpson Aug 14, 2023
ca55417
Merge branch 'main' into alek/apache_commons_string_utils_refaster_te…
timtebeek Aug 15, 2023
0f757de
finished adding refaster template classes for all possible methods
AlekSimpson Aug 15, 2023
3fba8ac
sorted refaster templates alphabetically
AlekSimpson Aug 16, 2023
49463b9
Update src/main/java/org/openrewrite/java/migrate/apache/commons/lang…
AlekSimpson Aug 16, 2023
87de25f
Update src/main/java/org/openrewrite/java/migrate/apache/commons/lang…
AlekSimpson Aug 16, 2023
7f6861b
Update build.gradle.kts
AlekSimpson Aug 16, 2023
16c3989
Update src/main/java/org/openrewrite/java/migrate/apache/commons/lang…
AlekSimpson Aug 16, 2023
d7d84f1
null checked all templates
AlekSimpson Aug 16, 2023
b22b3b1
commented out templates that I am not sure are accurate replacements …
AlekSimpson Aug 17, 2023
5f86951
Fix uberTest execution and expected values
timtebeek Aug 17, 2023
fa6480f
Minor fixes to some of the patterns
timtebeek Aug 17, 2023
9137626
Verify there's no change yet in additional cases
timtebeek Aug 17, 2023
f5b7cef
Add parentheses around replacement templates that need it
timtebeek Aug 17, 2023
169d3ac
Test that input methods are not called twice
timtebeek Aug 17, 2023
1963661
Swap case should also use parentheses
timtebeek Aug 17, 2023
eed020f
Fix rules Abbreviate through EqualsIgnoreCase
timtebeek Aug 18, 2023
2f1abc4
Disable inputMethodsNotCalledTwice; tracked separately
timtebeek Aug 18, 2023
0cc52fc
Check Equals through Lowercase
timtebeek Aug 18, 2023
db257b9
Fix RemoveEnd
timtebeek Aug 18, 2023
5d985dd
Fix Replace and Split
timtebeek Aug 18, 2023
f2ced41
Disable with note broken recipes
timtebeek Aug 18, 2023
78d9007
Disable Uncapitalize
timtebeek Aug 18, 2023
d8bfb50
Merge branch 'main' into alek/apache_commons_string_utils_refaster_te…
timtebeek Aug 18, 2023
44d1d81
Update build.gradle.kts
timtebeek Aug 18, 2023
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
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
implementation("org.openrewrite.gradle.tooling:model:$rewriteVersion")

implementation("commons-io:commons-io:2.+")
implementation("org.apache.commons:commons-lang3:3.+")
implementation("org.codehaus.plexus:plexus-utils:3.+")

runtimeOnly("org.openrewrite:rewrite-java-8")
Expand All @@ -51,6 +52,7 @@ dependencies {
testImplementation("commons-codec:commons-codec:1.+")
testImplementation("org.apache.commons:commons-lang3:3.+")
AlekSimpson marked this conversation as resolved.
Show resolved Hide resolved
testImplementation("org.apache.maven.shared:maven-shared-utils:3.+")
testImplementation("org.codehaus.plexus:plexus-utils:3.+")
timtebeek marked this conversation as resolved.
Show resolved Hide resolved

testRuntimeOnly("com.fasterxml.jackson.datatype:jackson-datatype-jsr353")
testRuntimeOnly("com.fasterxml.jackson.core:jackson-core")
Expand Down
Loading