We won't add a dependency to itself.
@@ -126,9 +126,11 @@ public class PodlockParser {
for (final String child : pod.getDependencies()) {
final Optional<DependencyId> childId = parseDependencyId(child);
if (childId.isPresent()) {
+ if (!dependencyId.equals(childId.get())) {
lazyBuilder.addParentWithChild(dependencyId, childId.get());
}
}
+ }
final Optional<String> superName = parseSuperPodName(podText);
if (superName.isPresent()) {
@@ -140,9 +142,11 @@ public class PodlockParser {
lazyBuilder.setDependencyName(superDependencyId, name);
lazyBuilder.setDependencyVersion(superDependencyId, version);
+ if (!dependencyId.equals(superDependencyId)) {
lazyBuilder.addParentWithChild(superDependencyId, dependencyId);
}
}
+ }
}
