ppkarwasz commented on code in PR #4186:
URL: https://github.com/apache/logging-log4j2/pull/4186#discussion_r3628381099


##########
log4j-layout-template-json/src/main/java/org/apache/logging/log4j/layout/template/json/resolver/ReadOnlyStringMapResolver.java:
##########
@@ -345,6 +356,9 @@ private enum LoopMethod implements TriConsumer<String, 
Object, LoopContext> {
 
         @Override
         public void accept(final String key, final Object value, final 
LoopContext loopContext) {
+            if (loopContext.keyExcludes != null && 
loopContext.keyExcludes.contains(key)) {

Review Comment:
   What about requiring `loopContext.keyExcludes` to be not null, so we don't 
need a null-check? The performance should be similar.



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