[seam-dev] Is this the mail API you always wanted?
Dan Allen
dan.j.allen at gmail.com
Mon Feb 7 15:39:17 EST 2011
On Mon, Feb 7, 2011 at 14:36, Emmanuel Bernard <emmanuel at hibernate.org>wrote:
> Random comments:
> - Is the from() method overloaded with a one arg version? We don't always
> have a decent name to associate an email with.
>
Along these lines, ALR points out:
I'd put the email address argument first in "from" and "to" methods. The
> Alias is optional and could be dropped in an overloaded form.
This follows one of ALR's (perhaps adopted) design rules: avoid changing
argument positions. For instance, an argument which is first should be first
in all cases (unless arguments are shifted right). If we dropped down to a
one-arg version of from(), then e-mail would shift from the second to the
first argument. Thus, reversing the order is more consistent.
...in this case, it might be irrelevant if we instead have these signatures:
from(String... address);
from(InternetAddress... address);
from(Collection<String> addresses);
from(Collection<InternetAddress> addresses);
We just don't support the two-argument form.
Btw, InternetAddress can parse an address with a personal part:
from("John Smith <john.smith at acme.com>")
-Dan
--
Dan Allen
Principal Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597
http://www.google.com/profiles/dan.j.allen#about
http://mojavelinux.com
http://mojavelinux.com/seaminaction
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20110207/37ee39be/attachment.html
More information about the seam-dev
mailing list