[
https://issues.apache.org/jira/browse/MAILET-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12984152#action_12984152
]
Stefano Bagnara commented on MAILET-5:
--------------------------------------
Do we want to try to fix this for 2.5?
This could break existing mailets, so I'm not sure this worth it, unless we
touch the recipients collection for some other reason.
> Currently our getRecipients expose the internal collection and it is used
> that way.
> -----------------------------------------------------------------------------------
>
> Key: MAILET-5
> URL: https://issues.apache.org/jira/browse/MAILET-5
> Project: Mailet
> Issue Type: Improvement
> Components: Core API
> Affects Versions: 2.4
> Reporter: Norman Maurer
> Assignee: Norman Maurer
> Fix For: 3.0
>
>
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.