diff --git a/rewrite-maven/src/main/java/org/openrewrite/maven/internal/MavenPomDownloader.java b/rewrite-maven/src/main/java/org/openrewrite/maven/internal/MavenPomDownloader.java index 013c1b2651a..d4f08e924ac 100644 --- a/rewrite-maven/src/main/java/org/openrewrite/maven/internal/MavenPomDownloader.java +++ b/rewrite-maven/src/main/java/org/openrewrite/maven/internal/MavenPomDownloader.java @@ -501,7 +501,7 @@ public Pom download(GroupArtifactVersion gav, return projectPom; } Parent parent = projectPom.getParent(); - while (parent != null){ + if (parent != null){ for (Pom project : projectPoms.values()) { if (parent.getGroupId().equals(project.getGroupId()) && parent.getArtifactId().equals(project.getArtifactId())){ if (projectPom.getVersion().equals(project.getValue(gav.getVersion()))){