Skip to content

Commit 8edc123

Browse files
Applying suggestion
1 parent b6a81a1 commit 8edc123

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ public Tree visit(@Nullable Tree tree, ExecutionContext ctx) {
120120
String dependencyGav = groupIdPattern + ":" + artifactIdPattern + (version == null ? "" : ":" + version);
121121
if (shouldInvert && !acc.contains(jp)) {
122122
return SearchResult.found(tree, "Module does not have dependency: " + dependencyGav);
123-
} else if (!shouldInvert && acc.contains(jp)) {
123+
}
124+
if (!shouldInvert && acc.contains(jp)) {
124125
return SearchResult.found(tree, "Module has dependency: " + dependencyGav);
125126
}
126127
return tree;

0 commit comments

Comments
 (0)