vy commented on code in PR #4133:
URL: https://github.com/apache/logging-log4j2/pull/4133#discussion_r3395389151
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowableStackTraceRenderer.java:
##########
@@ -64,7 +67,11 @@ public final void renderThrowable(
@SuppressWarnings("unchecked")
C createContext(final Throwable throwable) {
- final Map<Throwable, Context.Metadata> metadataByThrowable =
Context.Metadata.ofThrowable(throwable);
+ // `IdentityHashMap` is needed to deal with custom `equals()` and
`hashCode()` implementations causing
+ // collisions
+ final Map<Throwable, Context.Metadata> metadataByThrowable = new
IdentityHashMap<>();
+ Context.Metadata.populateMetadata(
+ metadataByThrowable, Collections.newSetFromMap(new
IdentityHashMap<>()), null, throwable);
Review Comment:
@ramanathan1504, this change is redundant. I've removed it in 2b93e18179.
Would you mind verifying it, please?
--
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]