Skip to content

Commit cd273ba

Browse files
authored
Add null check for AtomicBoolean in getVisitor
1 parent 3e45634 commit cd273ba

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/openrewrite/java/dependencies/search/RepositoryHasDependency.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public Tree visit(@Nullable Tree tree, ExecutionContext ctx) {
9797

9898
@Override
9999
public TreeVisitor<?, ExecutionContext> getVisitor(AtomicBoolean acc) {
100-
if (acc.get()) {
100+
if (acc != null && acc.get()) {
101101
return new TreeVisitor<Tree, ExecutionContext>() {
102102
@Override
103103
public Tree visit(@Nullable Tree tree, ExecutionContext ctx) {

0 commit comments

Comments
 (0)