From e929f1519549262d4259dff504bc427d185a82ce Mon Sep 17 00:00:00 2001 From: Kun Li <122563761+kunli2@users.noreply.github.com> Date: Tue, 7 Nov 2023 12:24:08 -0800 Subject: [PATCH] Add missing visit import alias (#3672) --- rewrite-java/src/main/java/org/openrewrite/java/JavaVisitor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/rewrite-java/src/main/java/org/openrewrite/java/JavaVisitor.java b/rewrite-java/src/main/java/org/openrewrite/java/JavaVisitor.java index 7d28636c23f..547bd0aa864 100644 --- a/rewrite-java/src/main/java/org/openrewrite/java/JavaVisitor.java +++ b/rewrite-java/src/main/java/org/openrewrite/java/JavaVisitor.java @@ -695,6 +695,7 @@ public J visitImport(J.Import import_, P p) { i = i.withMarkers(visitMarkers(i.getMarkers(), p)); i = i.getPadding().withStatic(visitLeftPadded(i.getPadding().getStatic(), JLeftPadded.Location.STATIC_IMPORT, p)); i = i.withQualid(visitAndCast(i.getQualid(), p)); + i = i.getPadding().withAlias(visitLeftPadded(i.getPadding().getAlias(), JLeftPadded.Location.IMPORT_ALIAS_PREFIX, p)); return i; }