Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3709

Missing null check in POP3 TopCmdHandler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • master
    • master
    • protocols
    • None

    Description

      TopCmdHandler is missing a null check when retrieving the message content, i.e. the InputStream can be null, which results in an NPE down the line. Admittedly this is a rare case, I only observed this during heavy load testing.

      On closer inspection it turns out that TopCmdHandler duplicates a major portion of code from RetrCmdHandler, but with subtle differences such as the null check mentioned above.

      I propose to refactor the two classes to make them share the code, and provide unit tests for all possible error/success cases.

      Attachments

        1. error.txt
          4 kB
          Ilja Weis

        Activity

          People

            Unassigned Unassigned
            kotto Karsten Otto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 6h
                6h