Skip to content

Commit

Permalink
openrewrite#141 adjusts precondition check to usage of use type in fa…
Browse files Browse the repository at this point in the history
…vor of MaybeUsesImport
  • Loading branch information
kevin0x90 committed Oct 19, 2023
1 parent 225212e commit 7641253
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import org.openrewrite.java.JavaIsoVisitor;
import org.openrewrite.java.JavaTemplate;
import org.openrewrite.java.RemoveAnnotationVisitor;
import org.openrewrite.java.search.MaybeUsesImport;
import org.openrewrite.java.search.UsesJavaVersion;
import org.openrewrite.java.search.UsesType;
import org.openrewrite.java.tree.*;

import java.util.*;
Expand Down Expand Up @@ -81,7 +81,7 @@ public Map<String, Set<String>> getInitialValue(ExecutionContext ctx) {
public TreeVisitor<?, ExecutionContext> getScanner(Map<String, Set<String>> acc) {
TreeVisitor<?, ExecutionContext> check = Preconditions.and(
new UsesJavaVersion<>(17),
new MaybeUsesImport<>(LOMBOK_VALUE_IMPORT)
new UsesType<>(LOMBOK_VALUE_IMPORT, false)
);

return Preconditions.check(check, new JavaIsoVisitor<ExecutionContext>() {
Expand Down

0 comments on commit 7641253

Please sign in to comment.