rschmitt opened a new issue, #3669: URL: https://github.com/apache/logging-log4j2/issues/3669
## Description An equality comparison between a `SortedArrayStringMap` and a `JdkMapAdapterStringMap` is guaranteed to return `false`: ```java public class JdkMapAdapterStringMap implements StringMap { @Override public boolean equals(final Object object) { if (object == this) { return true; } if (!(object instanceof JdkMapAdapterStringMap)) { return false; } ``` ```java public class SortedArrayStringMap implements IndexedStringMap { @Override public boolean equals(final Object obj) { if (obj == this) { return true; } if (!(obj instanceof SortedArrayStringMap)) { return false; } ``` This is a bummer for unit testing, because otherwise identical maps can be considered unequal depending upon how they were constructed and whether they were copied or just wrapped. The recent efficiency changes in the context map implementation seem to have brought this problem to the fore; evidently there are cases now where immutable maps are wrapped whereas previously they would have been copied. -- 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: notifications-unsubscr...@logging.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org