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

Mail component does not work as expected (Email Deletion is partially broken et Disconnect does not work well)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.9.5, 2.10.3
    • 2.11.2, 2.12.0
    • camel-mail
    • None
      • Exchange, but should happen with any mail server, since it is not directly related to (See above)
      • Apache James Server 3.X
    • Moderate

    Description

      The way disconnect is implemented causes issues with some other options of the consumer. For instance "disconnect" option is not compatible with "delete" option.

      The delete action is done in completion action (processCommit: line 185). On line 305, processCommit method checks if folder is open, but "disconnect" option force folder at null value at the end of poll method (Line 149).

      I guess disconnect method should be called on completion after any other completion actions occured: It is not possible to make completion actions if connection to mail server is closed.

      The result of the usage of disconnect option and delete option is a NullPointerException on test: "if (!folder.isOpen())" statement on line 308.

      Issue should be always reproductible.

      I let you fix the priority of the issue, but it is an annoying issue even if there is a workaround by disabling disconnect option ...

      Attachments

        1. MailConsumer.diff
          11 kB
          Alexis Kinsella
        2. MailConsumer.java
          18 kB
          Alexis Kinsella

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              alexiskinsella Alexis Kinsella
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: