Skip to content

Commit

Permalink
[MNG-8331] - Sometimes versioned dependencies disappear
Browse files Browse the repository at this point in the history
Clean up code
  • Loading branch information
jjkester committed Oct 18, 2024
1 parent fb99fb0 commit 412402b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,7 @@ public void mergeRepositories(List<Repository> toAdd, boolean replace) {
// Infer inner reactor dependencies version
//
Model transformFileToRaw(Model model) {
List<Dependency> newDeps = new ArrayList<>();
boolean modified = false;
List<Dependency> newDeps = new ArrayList<>(model.getDependencies().size());
for (Dependency dep : model.getDependencies()) {
if (dep.getVersion() == null) {
Dependency.Builder depBuilder = null;
Expand All @@ -591,15 +590,14 @@ Model transformFileToRaw(Model model) {
}
if (depBuilder != null) {
newDeps.add(depBuilder.build());
modified = true;
} else {
newDeps.add(dep);
}
} else {
newDeps.add(dep);
}
}
return modified ? model.withDependencies(newDeps) : model;
return model.withDependencies(newDeps);
}

String replaceCiFriendlyVersion(Map<String, String> properties, String version) {
Expand Down

0 comments on commit 412402b

Please sign in to comment.