You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/12/19 00:21:39 UTC
[GitHub] [logging-log4j2] carterkozak commented on a change in pull request #641: Fix string substitution recursion
carterkozak commented on a change in pull request #641:
URL: https://github.com/apache/logging-log4j2/pull/641#discussion_r771879643
##########
File path: log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginBuilder.java
##########
@@ -180,7 +181,9 @@ private void injectFields(final Builder<?> builder) throws IllegalAccessExceptio
final Object value = visitor.setAliases(aliases)
.setAnnotation(a)
.setConversionType(field.getType())
- .setStrSubstitutor(configuration.getStrSubstitutor())
+ .setStrSubstitutor(event == null
+ ? new ConfigurationStrSubstitutor(configuration.getStrSubstitutor())
+ : configuration.getStrSubstitutor())
Review comment:
manual edit
##########
File path: log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginBuilder.java
##########
@@ -253,7 +256,9 @@ private static Method findFactoryMethod(final Class<?> clazz) {
final Object value = visitor.setAliases(aliases)
.setAnnotation(a)
.setConversionType(types[i])
- .setStrSubstitutor(configuration.getStrSubstitutor())
+ .setStrSubstitutor(event == null
+ ? new ConfigurationStrSubstitutor(configuration.getStrSubstitutor())
+ : configuration.getStrSubstitutor())
Review comment:
here as well
--
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-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org