Skip to content

Commit de275bf

Browse files
authored
Fix a possible NPE as the return value of projectToInUse.get can also be null iso a boolean (#163)
1 parent 53a3602 commit de275bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/openrewrite/java/dependencies/RemoveDependency.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public TreeVisitor<?, ExecutionContext> getVisitor(Map<JavaProject, Boolean> pro
109109
}
110110
if (unlessUsing != null) {
111111
JavaProject jp = tree.getMarkers().findFirst(JavaProject.class).orElse(null);
112-
if (jp == null || projectToInUse.get(jp)) {
112+
if (jp == null || Boolean.TRUE.equals(projectToInUse.get(jp))) {
113113
return tree;
114114
}
115115
}

0 commit comments

Comments
 (0)