Cyril Martin created LOG4J2-2270: ------------------------------------ Summary: 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
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)