Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9841

NPE in MIME-Multipart Data Format if no file name is defined on attachment

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.17.0
    • Fix Version/s: 2.17.1, 2.18.0
    • Component/s: camel-mail
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown

      Description

      If an MIME-Multipart message is unmarshalled into a Camel Message with attachments and the attachment parts do not have a file name defined, the MIME-Multipart data format will throw a NullPointerException (because the file name is used as the key for the map where the DataHandler is stored in the Camel Message).

      The provided patch checks whether there is a file name defined on the data handler. If this is not the case the Content-ID header of the attachment is used, if that is also not defined a unique id is generated for the key.

      See the two attached MIME-Multipart documents used in the unit tests for details.

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              siano Stephan Siano
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: