vy commented on code in PR #4133:
URL: https://github.com/apache/logging-log4j2/pull/4133#discussion_r3335262532
##########
log4j-core-test/src/main/java/org/apache/logging/log4j/core/test/impl/ThrowableCollisionTest.java:
##########
Review Comment:
@ramanathan1504, thanks so much for the fix. This issue is indeed due. Would
you mind updating your changes with following remarks in mind, please?
1. Extend `ThrowablePatternConverterTest.AbstractStackTraceTest`. I think
you can simply get away with updating `TestFriendlyException` — see
[TestFriendlyException-identity-malfunction.patch] in the attachment. If the
`ThrowablePatternConverterTest` coverage is sufficient, it should trigger the
issue reported in the ticket. Would you mind applying the patch and verifying
this, please?
2. Add a comment as follows to everywhere we've added `IdentityHashMap`:
```
// `IdentityHashMap` is needed to deal with custom `equals()` and
`hashCode()` implementations causing collisions
```
[TestFriendlyException-identity-malfunction.patch]:
https://github.com/user-attachments/files/28470335/TestFriendlyException-identity-malfunction.patch
--
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]