Skip to content

Commit

Permalink
Fix quality flaw: refactor "findMavenProject" method
Browse files Browse the repository at this point in the history
  • Loading branch information
leveretka authored and dorian-burihabwa-sonarsource committed Mar 6, 2024
1 parent bce0bd0 commit 9059ca0
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,7 @@ private static MavenProject findMavenProject(final File modulePath, Collection<M
if (canonical.isDirectory()) {
File pom = new File(canonical, "pom.xml");
for (MavenProject module : modules) {
if (module.getFile().getCanonicalFile().equals(pom)) {
return module;
}
}
for (MavenProject module : modules) {
if (module.getBasedir().equals(canonical)) {
if (module.getFile().getCanonicalFile().equals(pom) || module.getBasedir().equals(canonical)) {
return module;
}
}
Expand Down

0 comments on commit 9059ca0

Please sign in to comment.