Robert Burrell Donkin ha scritto: > On Sat, Jan 17, 2009 at 11:47 PM, Markus Wiederkehr > <[email protected]> wrote: >> I would like to refactor a few things in Mime4j: >> >> 1) I think package o.a.j.mime4j.decoder should be renamed in >> o.a.j.mime4j.codec because it also contains a few encoder classes. > > +1
+1 >> 2) How about replacing o.a.j.m.field.address.AddressList by >> List<Address>? Analogous for DomainList and MailboxList. I think these >> classes were useful when Mime4j was a Java 1.4 library; now their >> purpose is questionable. > > i quite like them but the API would be more obvious and simple without > them so i'm > > +1 > there are some utility methods which are used in protocol work > downstream (eg flatten) but these could easily enough factored out +0 (I don't read that code since months) if AddressList, DomainList, MailboxList expose more than a simple list then they deserve to be kept, otherwise the java5 collections are fine. E.g: in mime the "mailboxlist" is defined by the RFC and also its serialization is defined. This reason, alone, does not justify the existence of the MailboxList class, but if something more complex exists about that collection handling then moving to a generic java5 list may be wrong. >> 3) I would also like to merge o.a.j.m.util.MessageUtils into MimeUtil. >> I don't think we need two utility classes with very similar purposes. > > +1 > > there was a time when it looked like there may be enough code to > justify the split. it hasn't turned out that way. let's simplify. I don't check package depedency cycles since 0.4, but if they are in the same package this should not change things. Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
