Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2270

Strings::join, when called with [null] returns "null" instead of EMPTY

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.10.0
    • Fix Version/s: 2.11.0, 3.0.0
    • Component/s: API
    • Labels:
      None

      Description

      The javadoc 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.

       Strings.join(Arrays.asList((String)null), '.') 

      returns "null" where I expected EMPTY ("")

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                garydgregory Gary Gregory
                Reporter:
                mcoolive1 Cyril Martin
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: