File tree Expand file tree Collapse file tree 3 files changed +15
-10
lines changed
main/resources/META-INF/rewrite
test/java/net/dv8tion/jda/test/rewrite Expand file tree Collapse file tree 3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ dependencies {
169169
170170 // OpenRewrite
171171 // Import Rewrite's bill of materials.
172- testImplementation(platform(" org.openrewrite.recipe:rewrite-recipe-bom:3.3.0 " ))
172+ testImplementation(platform(" org.openrewrite.recipe:rewrite-recipe-bom:3.6.1 " ))
173173
174174 // rewrite-java dependencies only necessary for Java Recipe development
175175 testImplementation(" org.openrewrite:rewrite-java" )
Original file line number Diff line number Diff line change @@ -89,10 +89,9 @@ recipeList:
8989 - org.openrewrite.java.ChangeMethodName :
9090 methodPattern : net.dv8tion.jda.api.interactions.modals.ModalMapping getId()
9191 newMethodName : getCustomId
92- # Bugged due to inner classes
93- # - org.openrewrite.java.ChangeMethodName:
94- # methodPattern: net.dv8tion.jda.api.components.selects.SelectMenu.Builder getId()
95- # newMethodName: getCustomId
96- # - org.openrewrite.java.ChangeMethodName:
97- # methodPattern: net.dv8tion.jda.api.components.textinput.TextInput.Builder getId()
98- # newMethodName: getCustomId
92+ - org.openrewrite.java.ChangeMethodName :
93+ methodPattern : net.dv8tion.jda.api.components.selects.SelectMenu.Builder getId()
94+ newMethodName : getCustomId
95+ - org.openrewrite.java.ChangeMethodName :
96+ methodPattern : net.dv8tion.jda.api.components.textinput.TextInput.Builder getId()
97+ newMethodName : getCustomId
Original file line number Diff line number Diff line change @@ -225,8 +225,14 @@ void replacesGetId()
225225 )
226226 );
227227
228- // This is bugged, most likely due to inner classes,
229- // i've tried to switch the inner class separator from . to $, same result.
228+ // Nested classes are bugged.
229+ //
230+ // Upgrading versions (3.3.0 -> 3.6.1) had *some* improvement,
231+ // but it will still *add* an import for the nested class,
232+ // even though it is already qualified starting from the already-imported top-level class.
233+ //
234+ // Though this will happen only if the import wasn't already present,
235+ // it will still produce valid code and the user can mass optimize imports when it's finished.
230236// rewriteRun(
231237// spec -> spec.recipeFromResources("net.dv8tion.MigrateComponentsV2"),
232238// //language=java
You can’t perform that action at this time.
0 commit comments