kennymacleod commented on a change in pull request #761:
URL: https://github.com/apache/logging-log4j2/pull/761#discussion_r809919399
##########
File path:
log4j-1.2-api/src/main/java/org/apache/log4j/config/PropertiesConfiguration.java
##########
@@ -436,6 +436,10 @@ public Appender parseAppender(final Properties props,
final String appenderName)
final String layoutPrefix = prefix + ".layout";
final String filterPrefix = APPENDER_PREFIX + appenderName +
".filter.";
final String className = OptionConverter.findAndSubst(prefix, props);
+ if (className == null) {
+ LOGGER.debug("Appender \"" + appenderName + "\" does not exist.");
+ return null;
+ }
Review comment:
Without this null-check, there will be a NPE from the next line down.
--
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]