gnodet commented on code in PR #1821: URL: https://github.com/apache/maven/pull/1821#discussion_r1807287840
########## maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java: ########## @@ -564,20 +564,21 @@ 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; + if (model.getDependencies().isEmpty()) { + return model; + } + List<Dependency> newDeps = new ArrayList<>(model.getDependencies().size()); for (Dependency dep : model.getDependencies()) { if (dep.getVersion() == null) { - Dependency.Builder depBuilder = null; Model depModel = getRawModel(model.getPomFile(), dep.getGroupId(), dep.getArtifactId()); Review Comment: Good point, I've extracted it in https://github.com/apache/maven/pull/1822 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org