Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-185

Possible NPE in Threader.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.0
    • NNTP
    • None
    • Fortify

    Description

      In Threader.gatherSubjects, it appears to be possible for tail.next = c.child; to be null [line 356]:

      349 if (old.threadable == null && c.threadable == null) {
      350 // both dummies - merge them
      351 ThreadContainer tail;
      352 for (tail = old.child;
      353 tail != null && tail.next != null;
      354 tail = tail.next);
      355
      356 tail.next = c.child;

      It also seems kind of pointless, given that the subsequent line immediately resets tail to c.child. Perhaps the ; is not intended there?

      Attachments

        Activity

          People

            Unassigned Unassigned
            bayard Henri Yandell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: