vy commented on code in PR #1538:
URL: https://github.com/apache/logging-log4j2/pull/1538#discussion_r1254685045


##########
log4j-core/src/main/java/org/apache/logging/log4j/core/selector/ContextSelector.java:
##########
@@ -108,7 +108,7 @@ default LoggerContext getContext(String fqcn, ClassLoader 
loader, Map.Entry<Stri
     default LoggerContext getContext(String fqcn, ClassLoader loader, 
Map.Entry<String, Object> entry,
             boolean currentContext, URI configLocation) {
         final LoggerContext lc = getContext(fqcn, loader, currentContext, 
configLocation);
-        if (lc != null) {
+        if (lc != null && entry != null) {

Review Comment:
   Since `getContext()` is to be implemented by the subclass, I thought we 
cannot have such an assumption. Nevertheless, if you think otherwise, be my 
guest to update it.



-- 
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]

Reply via email to