You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Fábio Constantino (Jira)" <ji...@apache.org> on 2021/12/16 18:41:00 UTC

[jira] [Updated] (LOG4J2-3247) PropertiesConfiguration.parseAppenderFilters NPE when parsing properties file filters

     [ https://issues.apache.org/jira/browse/LOG4J2-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fábio Constantino updated LOG4J2-3247:
--------------------------------------
    Description: 
When parsing appender filters configured in the properties file for example:
{code:java}
log4j.appender.LOG_REQUEST_START_DB=my.appender.class
log4j.appender.LOG_REQUEST_START_DB.filter.ID=my.filter.class{code}
a NullPointerException is thrown on line 564 of org.apache.log4j.config.PropertiesConfiguration. The _next_ variable is always _null_ at that point, from what appears to be a bug in the _if_ condition above (looks like it should be _head == null_ instead of {_}head != null{_}).

 

Note: this is using the log4j1.compatibility=true property

  was:
When parsing appender filters configured in the properties file for example:
{code:java}
log4j.appender.LOG_REQUEST_START_DB=my.appender.class
log4j.appender.LOG_REQUEST_START_DB.filter.ID=my.filter.class{code}
a NullPointerException is thrown on line 564 of org.apache.log4j.config.PropertiesConfiguration. The _next_ variable is always _null_ at that point, from what appears to be a bug in the _if_ condition above (looks like it should be _head == null_ instead of {_}head != null{_}).


> PropertiesConfiguration.parseAppenderFilters NPE when parsing properties file filters
> -------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3247
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3247
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Configurators
>    Affects Versions: 2.16.0
>            Reporter: Fábio Constantino
>            Priority: Blocker
>
> When parsing appender filters configured in the properties file for example:
> {code:java}
> log4j.appender.LOG_REQUEST_START_DB=my.appender.class
> log4j.appender.LOG_REQUEST_START_DB.filter.ID=my.filter.class{code}
> a NullPointerException is thrown on line 564 of org.apache.log4j.config.PropertiesConfiguration. The _next_ variable is always _null_ at that point, from what appears to be a bug in the _if_ condition above (looks like it should be _head == null_ instead of {_}head != null{_}).
>  
> Note: this is using the log4j1.compatibility=true property



--
This message was sent by Atlassian Jira
(v8.20.1#820001)