You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2017/12/31 05:22:00 UTC
[jira] [Commented] (LOG4J2-2002)
DefaultConfigurationBuilder.writeXmlAttributes does not handle null
attribute values
[ https://issues.apache.org/jira/browse/LOG4J2-2002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307084#comment-16307084 ]
Ralph Goers commented on LOG4J2-2002:
-------------------------------------
All the DefaultLoggerComponentBuilder constructors have a level parameter that must be specified. At the very least we should provide one that doesn't require the level. But if a null is passed as a parameter I don't think we should be adding it as an attribute.
> DefaultConfigurationBuilder.writeXmlAttributes does not handle null attribute values
> ------------------------------------------------------------------------------------
>
> Key: LOG4J2-2002
> URL: https://issues.apache.org/jira/browse/LOG4J2-2002
> Project: Log4j 2
> Issue Type: Bug
> Components: Configurators
> Affects Versions: 2.8.2
> Reporter: Paul Burrowes
> Assignee: Mikael Ståldal
>
> The default java {{XMLStreamWriterImpl}} {{writeXMLContent()}} requires that the content argument be non-null. Attributes in a Log4J component configuration may be null which breaks export.
> {{DefaultConfigurationBuilder.writeXmlAttributes()}} needs to perform a null check for every attribute before passing it to {{XMLStreamWriterImpl.writeAttribute()}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)