<div class="gmail_quote">On Mon, Feb 7, 2011 at 14:36, Emmanuel Bernard <span dir="ltr">&lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div style="word-wrap:break-word"><div>Random comments:</div> - Is the from() method overloaded with a one arg version? We don&#39;t always have a decent name to associate an email with.</div></blockquote><div><br></div>
<div>
Along these lines, ALR points out:</div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

I&#39;d put the email address argument first in &quot;from&quot; and &quot;to&quot; methods.  The Alias is optional and could be dropped in an overloaded form.</blockquote><div><br></div><div>This follows one of ALR&#39;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.</div>

<div><br></div><div>...in this case, it might be irrelevant if we instead have these signatures:</div><div><br></div><div>from(String... address);</div><div>from(InternetAddress... address);</div><div>from(Collection&lt;String&gt; addresses);</div>

<div>from(Collection&lt;InternetAddress&gt; addresses);</div><div><br></div><div>We just don&#39;t support the two-argument form.</div><div><br></div><div>Btw, InternetAddress can parse an address with a personal part:</div>

<div><br></div><div>from(&quot;John Smith &lt;<a href="mailto:john.smith@acme.com">john.smith@acme.com</a>&gt;&quot;)</div><div> </div><div>-Dan</div><div><br></div></div>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>

Registered Linux User #231597<br><br><div><a href="http://www.google.com/profiles/dan.j.allen#about" target="_blank">http://www.google.com/profiles/dan.j.allen#about</a><br><a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>

<a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br></div><br>