You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2018/02/25 18:01:00 UTC

[jira] [Assigned] (LOG4J2-2270) Strings::join, when called with [null] returns "null" instead of EMPTY

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

Gary Gregory reassigned LOG4J2-2270:
------------------------------------

    Assignee: Gary Gregory

> Strings::join, when called with [null] returns "null" instead of EMPTY
> ----------------------------------------------------------------------
>
>                 Key: LOG4J2-2270
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2270
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.10.0
>            Reporter: Cyril Martin
>            Assignee: Gary Gregory
>            Priority: Minor
>
> The [javadoc|https://logging.apache.org/log4j/2.x/log4j-api/apidocs/org/apache/logging/log4j/util/Strings.html#join(java.util.Iterator,%20char)] states "Null objects [...] within the iteration are represented by empty strings".
> But when there is exactly one element, Strings::join do not test if it is null.
> {code} Strings.join(Arrays.asList((String)null), '.') {code}
> returns "null" where I expected EMPTY ("")



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)