ppkarwasz commented on code in PR #4186:
URL: https://github.com/apache/logging-log4j2/pull/4186#discussion_r3628910478
##########
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:
Yes, this should not impact performance and would be easier to understand by
developers. You can even add a JSpecify `@NonNull` annotation on the field, so
it is clear it can not be `null`.
--
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]