From 512268f5d9ad71372c84c5bb57c2c1f785130245 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Tue, 3 Sep 2024 11:31:27 +0200 Subject: [PATCH] Include cursor with call in UseJoinColumnForMapping to ChangeType --- .../openrewrite/java/migrate/javax/UseJoinColumnForMapping.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/java/migrate/javax/UseJoinColumnForMapping.java b/src/main/java/org/openrewrite/java/migrate/javax/UseJoinColumnForMapping.java index 37580d5d6c..bb867eaa57 100644 --- a/src/main/java/org/openrewrite/java/migrate/javax/UseJoinColumnForMapping.java +++ b/src/main/java/org/openrewrite/java/migrate/javax/UseJoinColumnForMapping.java @@ -70,7 +70,7 @@ public J.VariableDeclarations visitVariableDeclarations(J.VariableDeclarations m // The javax.persistence.Column attributes length, precision, and scale are not kept. maybeRemoveImport(COLUMN); maybeAddImport(JOIN_COLUMN); - J.VariableDeclarations joinColumn = (J.VariableDeclarations) new ChangeType(COLUMN, JOIN_COLUMN, false).getVisitor().visit(multiVariable, ctx); + J.VariableDeclarations joinColumn = (J.VariableDeclarations) new ChangeType(COLUMN, JOIN_COLUMN, false).getVisitor().visit(multiVariable, ctx, getCursor()); joinColumn = (J.VariableDeclarations) new RemoveAnnotationAttribute(JOIN_COLUMN, "length").getVisitor().visit(joinColumn, ctx); joinColumn = (J.VariableDeclarations) new RemoveAnnotationAttribute(JOIN_COLUMN, "precision").getVisitor().visit(joinColumn, ctx); joinColumn = (J.VariableDeclarations) new RemoveAnnotationAttribute(JOIN_COLUMN, "scale").getVisitor().visit(joinColumn, ctx);