Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-703

StringUtils.join throws NPE when toString returns null for one of objects in collection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • None
    • None

    Description

      Try

       
      StringUtils.join(new Object[]{
              new Object() {
                @Override
                public String toString() {
                  return null;
                }
              }
          }, ',');
      

      ToString should probably never return null, but it does in javax.mail.internet.InternetAddress

      Attachments

        1. StringUtil_Join_NPE_AVG_16.patch
          4 kB
          Asela Illayapparachchi
        2. StringUtil_Join_NPE.patch
          3 kB
          Asela Illayapparachchi

        Activity

          People

            Unassigned Unassigned
            link Ilya
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: