gnodet commented on issue #12584: URL: https://github.com/apache/maven/issues/12584#issuecomment-5461051977
Closing as invalid after deeper investigation. The `SoftIdentityMap` class name is misleading, but the value-equality behavior is **correct and required**. `ModelBuilderRequest` (and many other Request classes) override `equals()`/`hashCode()` with value-based comparison. The cache in `DefaultRequestCache.doCache()` relies on structurally-equal request objects getting cache hits. Changing to identity semantics (`==` / `System.identityHashCode()`) causes `ConsumerPomBuilderTest.testSimpleConsumer` to fail because the model builder creates new request objects for the same parent POM that need to match cached results. The "Identity" in the class name refers to the SoftReference identity-tracking pattern (maintaining reference identity through GC cycles), not to key comparison semantics. A rename would be appropriate, but changing the comparison behavior is not. -- 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]
