Skip to content

Commit 86c0b92

Browse files
Reorder maybeRemoveImport before maybeAddImport
Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.recipes.RemoveImportBeforeAddImport?organizationId=QUxML01vZGVybmUvTW9kZXJuZSArIE9wZW5SZXdyaXRl Co-authored-by: Moderne <[email protected]>
1 parent d7b0867 commit 86c0b92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/openrewrite/java/migrate/jakarta/UpdateManagedBeanToNamed.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {
6464
public J.Annotation visitAnnotation(J.Annotation annotation, ExecutionContext ctx) {
6565
Optional<Annotated> annotated = new Annotated.Matcher(MANAGED_BEAN_MATCHER).get(getCursor());
6666
if (annotated.isPresent()) {
67-
maybeAddImport("jakarta.inject.Named");
6867
maybeRemoveImport("javax.faces.bean.ManagedBean");
68+
maybeAddImport("jakarta.inject.Named");
6969
maybeRemoveImport("jakarta.faces.bean.ManagedBean");
7070
// Get the name from the @ManagedBean annotation
7171
String beanName = annotated

0 commit comments

Comments
 (0)