Skip to content

Commit

Permalink
Remove unused imports after remove unused private methods
Browse files Browse the repository at this point in the history
Fixes #347
  • Loading branch information
timtebeek committed Oct 6, 2024
1 parent d523fc1 commit 34b5938
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.openrewrite.TreeVisitor;
import org.openrewrite.java.JavaIsoVisitor;
import org.openrewrite.java.NoMissingTypes;
import org.openrewrite.java.RemoveUnusedImports;
import org.openrewrite.java.search.FindAnnotations;
import org.openrewrite.java.service.AnnotationService;
import org.openrewrite.java.tree.*;
Expand Down Expand Up @@ -123,6 +124,7 @@ public J.MethodDeclaration visitMethodDeclaration(J.MethodDeclaration method,
}
}

doAfterVisit(new RemoveUnusedImports().getVisitor());
//noinspection ConstantConditions
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ private Stream<Object> unused() {
}
""",
"""
import java.util.stream.Stream;
class Test {
void test(String input) {
}
Expand Down

0 comments on commit 34b5938

Please sign in to comment.