You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Maven CLI , and my project is a multi module project.
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:2.32.0-SNAPSHOT -Drewrite.activeRecipes=org.openrewrite.java.migrate.joda.JodaTimeRecipe -Drewrite.exportDatatables=true
What is the full stack trace of any errors you encountered?
org.openrewrite.internal.RecipeRunException: java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 1
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:290)
at org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:320)
at org.openrewrite.java.JavaVisitor.visitRightPadded(JavaVisitor.java:1367)
at org.openrewrite.java.JavaVisitor.lambda$visitContainer$35(JavaVisitor.java:1417)
at org.openrewrite.java.JavaVisitor$$Lambda/0x000000080052dd10.apply(Unknown Source)
at org.openrewrite.internal.ListUtils.map(ListUtils.java:243)
at org.openrewrite.internal.ListUtils.map(ListUtils.java:265)
at org.openrewrite.java.JavaVisitor.visitContainer(JavaVisitor.java:1417)
at org.openrewrite.java.JavaVisitor.visitMethodInvocation(JavaVisitor.java:914)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.visitMethodInvocation(JodaTimeVisitor.java:165)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.visitMethodInvocation(JodaTimeVisitor.java:36)
at org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3927)
at org.openrewrite.java.tree.J.accept(J.java:59)
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:320)
at org.openrewrite.java.JavaVisitor.visitRightPadded(JavaVisitor.java:1367)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4(JavaVisitor.java:397)
at org.openrewrite.java.JavaVisitor$$Lambda/0x000000080052f5b8.apply(Unknown Source)
at org.openrewrite.internal.ListUtils.map(ListUtils.java:243)
at org.openrewrite.internal.ListUtils.map(ListUtils.java:265)
at org.openrewrite.java.JavaVisitor.visitBlock(JavaVisitor.java:396)
at org.openrewrite.java.tree.J$Block.acceptJava(J.java:838)
at org.openrewrite.java.tree.J.accept(J.java:59)
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:320)
at org.openrewrite.java.JavaVisitor.visitMethodDeclaration(JavaVisitor.java:875)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.visitMethodDeclaration(JodaTimeVisitor.java:89)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.visitMethodDeclaration(JodaTimeVisitor.java:36)
at org.openrewrite.java.tree.J$MethodDeclaration.acceptJava(J.java:3673)
at org.openrewrite.java.tree.J.accept(J.java:59)
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:320)
at org.openrewrite.java.JavaVisitor.visitRightPadded(JavaVisitor.java:1367)
at org.openrewrite.java.JavaVisitor.lambda$visitBlock$4(JavaVisitor.java:397)
at org.openrewrite.java.JavaVisitor$$Lambda/0x000000080052f5b8.apply(Unknown Source)
at org.openrewrite.internal.ListUtils.map(ListUtils.java:243)
at org.openrewrite.internal.ListUtils.map(ListUtils.java:265)
at org.openrewrite.java.JavaVisitor.visitBlock(JavaVisitor.java:396)
at org.openrewrite.java.tree.J$Block.acceptJava(J.java:838)
at org.openrewrite.java.tree.J.accept(J.java:59)
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:320)
at org.openrewrite.java.JavaVisitor.visitClassDeclaration(JavaVisitor.java:482)
at org.openrewrite.java.tree.J$ClassDeclaration.acceptJava(J.java:1291)
at org.openrewrite.java.tree.J.accept(J.java:59)
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visitAndCast(TreeVisitor.java:320)
at org.openrewrite.java.JavaVisitor.lambda$visitCompilationUnit$9(JavaVisitor.java:495)
at org.openrewrite.java.JavaVisitor$$Lambda/0x000000080052e278.apply(Unknown Source)
at org.openrewrite.internal.ListUtils.map(ListUtils.java:243)
at org.openrewrite.internal.ListUtils.map(ListUtils.java:265)
at org.openrewrite.java.JavaVisitor.visitCompilationUnit(JavaVisitor.java:495)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.visitCompilationUnit(JodaTimeVisitor.java:84)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.visitCompilationUnit(JodaTimeVisitor.java:36)
at org.openrewrite.java.tree.J$CompilationUnit.acceptJava(J.java:1562)
at org.openrewrite.java.tree.J.accept(J.java:59)
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:157)
at org.openrewrite.ScanningRecipe$1.visit(ScanningRecipe.java:121)
at org.openrewrite.ScanningRecipe$1.visit(ScanningRecipe.java:103)
at org.openrewrite.scheduling.RecipeRunCycle.lambda$editSources$6(RecipeRunCycle.java:186)
at org.openrewrite.scheduling.RecipeRunCycle$$Lambda/0x00000008005fef98.call(Unknown Source)
at io.micrometer.core.instrument.AbstractTimer.recordCallable(AbstractTimer.java:178)
at org.openrewrite.table.RecipeRunStats.recordEdit(RecipeRunStats.java:67)
at org.openrewrite.scheduling.RecipeRunCycle.lambda$editSources$7(RecipeRunCycle.java:182)
... 24 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 4 out of bounds for length 1
at java.base/java.util.Arrays$ArrayList.get(Arrays.java:4266)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.migrateMethodCall(JodaTimeVisitor.java:234)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.visitMethodInvocation(JodaTimeVisitor.java:176)
at org.openrewrite.java.migrate.joda.JodaTimeVisitor.visitMethodInvocation(JodaTimeVisitor.java:36)
at org.openrewrite.java.tree.J$MethodInvocation.acceptJava(J.java:3927)
at org.openrewrite.java.tree.J.accept(J.java:59)
at org.openrewrite.TreeVisitor.visit(TreeVisitor.java:250)
... 88 more
Thanks for the reports and details @christopherfischer ! For a bit of context, these recipes are new and contributed by @amishra-u from our OSS community. Very helpful that you're providing a runnable test to make these easier to look into. I'll link the others here as well such that's there's one notification going out.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
I am using the Maven CLI , and my project is a multi module project.
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-migrate-java:2.32.0-SNAPSHOT -Drewrite.activeRecipes=org.openrewrite.java.migrate.joda.JodaTimeRecipe -Drewrite.exportDatatables=true
What is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?
The text was updated successfully, but these errors were encountered: