gnodet commented on PR #2014:
URL: https://github.com/apache/maven-resolver/pull/2014#issuecomment-5101462919

   Thanks for the review! Both suggestions addressed in 08029607:
   
   1. **`DefaultDependencyManager` coverage** — added 
`testDeriveChildManagerReusesInstanceWithDefaultManager` which verifies the 
optimization fires at the very first derivation with `applyFrom=0` 
(assertSame), and that it correctly creates new instances when management data 
is present (assertNotSame).
   
   2. **"Nearer-to-root wins" invariant** — added 
`testNearerToRootWinsAfterOptimizationReusesInstance` which explicitly 
documents the invariant: root contributes `x:1.0` at depth 1, the optimization 
reuses the instance at depth 2→3, then a deeper POM tries to override `x` with 
`2.0` — the test verifies `containsManagedVersion` finds it in ancestors, skips 
collection (so the optimization fires again), and `getManagedVersion` still 
returns `1.0`.


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