vy commented on code in PR #4070:
URL: https://github.com/apache/logging-log4j2/pull/4070#discussion_r3156445217
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java:
##########
@@ -300,10 +300,16 @@ public LoggerContext getContext(
final boolean currentContext,
final List<URI> configLocations,
final String name) {
- final LoggerContext ctx =
- selector.getContext(fqcn, loader, currentContext, null /*this
probably needs to change*/);
- if (externalContext != null && ctx.getExternalContext() == null) {
- ctx.setExternalContext(externalContext);
+ final LoggerContext ctx;
+ if (externalContext instanceof Map.Entry) {
Review Comment:
@ppkarwasz, this entire `Map.Entry` family existing in `LC` method
footprints appear like an ugly hack to me, yet it is public. That is, we cannot
change it. @ramanathan1504's proposal in this PR looks legitimate to me. I'd
appreciate a 2nd pair of eyes on this change. Would you mind quickly skimming
through it and see if you can spot anything suspicious, 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]