I think you can't deny MailAddress represent the same concept in both
mailet and protocols/smtp .

Thus, it seems logical to have one object to represent it.

I agree the way I proposed to share this code might not be optimal.
Maybe some common dependency might be better.

Note : MailetMailAddressAdapter converts
org.apache.james.protocols.smtp.MailAddress into
org.apache.mailet.MailAddress. Both  MailAddress classes are copied and
paste from one another and have started to diverge. One is tested not
the other.

Le 02/05/2016 à 16:22, Matthieu Baechler a écrit :
> 
> 
> On 04/29/2016 08:32 AM, Benoit Tellier wrote:
>> Moreover, we should take advantage of this task to factorize code :
>>
>> We have two MailAddress classes :
>>
>> org.apache.mailet.MailAddress
>> org.apache.james.protocols.smtp.MailAddress;
>>
>> These two class have almost the same content (copy and paste ?), and
>> tests are only written for the mailet one.
>>
>> In my opinion, we must make smtp protocol depend on mailet api to reuse
>> MailAddress object across our projects and fight code duplication.
>>
> IMO you overestimate the value of sharing code.
> 
> Why SMTP should depend on mailet from a business point of view ?
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to