[
https://issues.apache.org/jira/browse/MAILET-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240318#comment-13240318
]
Peter Poier commented on MAILET-9:
----------------------------------
One problem that I encountered with the MailAddress class. If I have some
InternetAddress object internetAddress and give it a Personal Name:
InternetAddress.setPersonal("personalName")
If I now create a MailAddress object of it:
MailAddress mailAddress = new MailAddress(internetAddress);
and then convert the mailAddress back to an InternetAddress object:
InternetAddress internetAddress2= mailAddress.toInternetAddress();
The Personal name is lost, i.e.:
internetAddress2.getPersonal() is empty.
> [API Design] Reconsider MailAddress
> -----------------------------------
>
> Key: MAILET-9
> URL: https://issues.apache.org/jira/browse/MAILET-9
> Project: Mailet
> Issue Type: Task
> Affects Versions: 2.4
> Reporter: Robert Burrell Donkin
> Fix For: 3.0
>
>
> MailAddress represents an internet mail address. It is a concrete class
> including good, standards compliant code for parsing addresses. The strength
> of this design is that it enforces standards. This is also the weakness of
> the design. Occasionally, a looser algorithm capable of dealing with
> non-RFC822 mail would be preferable.
> Consider factoring as a logical interface (implemented as either an empty
> abstract class - my preference - or an Interface) capable of alternative
> implementations. The current class would become StandardMailAddress. Consider
> adding a marker flag for those addresses which are not RFC822 compliant.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira