gnodet commented on PR #12908: URL: https://github.com/apache/maven/pull/12908#issuecomment-5461051759
Closing this PR — the fix is incorrect. After CI investigation, `ConsumerPomBuilderTest.testSimpleConsumer` fails because `ModelBuilderRequest` (and many other Request classes) override `equals()`/`hashCode()` with value-based comparison. The model builder cache in `DefaultRequestCache` relies on structurally-equal request objects getting cache hits via `SoftIdentityMap`. Changing to identity-based comparison (`==` / `System.identityHashCode()`) breaks the cache: when the model builder creates a new request for the same parent POM, it no longer finds the cached result, causing resolution failures. The "Identity" in `SoftIdentityMap` refers to the SoftReference identity-tracking pattern (maintaining reference identity through GC cycles), not to key comparison semantics. The value-equality behavior is correct and required by the codebase. -- 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]
