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

MailImpl expose internal representation on getRecipients. This is a bad practice.

    XMLWordPrintableJSON

Details

    Description

      Currently our getRecipients expose the internal collection and it is used that way.
      To add recipients we use getRecipients().add(), to store multiple times a single mail to different recipients we get the recipients collection and alter it between store of the mail object (in RemoteDelivery).
      All of this seems to me bad practice and we should better encapsulate the recipients list in the mail object.
      Maybe the simple way is to return immutable collections so we'll find bugs as soon as possible and add methods to add and remove recipients directly in the mail interface.

      Attachments

        Activity

          People

            norman Norman Maurer
            bago Stefano Bagnara
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: