Hiteshsai007 commented on PR #12416:
URL: https://github.com/apache/maven/pull/12416#issuecomment-4932083833

   Thanks for the review @gnodet! Both suggestions have been addressed in the 
latest commit:
   
   **1. Unnecessary list copy fix:**
   Replaced the single `boolean changed` flag with separate `boolean 
depsChanged` and `boolean mgmtChanged` flags. Now 
`builder.dependencies(newDeps)` is only called when regular dependencies 
actually changed, avoiding the unnecessary copy when only 
`dependencyManagement` was modified.
   
   **2. Duplicated loop logic:**
   Extracted a new `inferDependencies(Model, List<Dependency>, 
List<Dependency>)` helper method that encapsulates the shared loop logic for 
inferring missing version/groupId. Both the regular dependencies and 
`dependencyManagement` dependencies processing now delegate to this single 
method, eliminating the duplication.
   
   The branch has also been rebased onto the latest `master` to trigger CI.
   


-- 
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