gnodet commented on code in PR #1823:
URL: https://github.com/apache/maven/pull/1823#discussion_r1807254428


##########
maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelBuilder.java:
##########
@@ -591,13 +593,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);

Review Comment:
   `model.withDependencies()` will always create a new object if not modified.
   I don't see why this would be needed.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to