On Sun, Jan 18, 2009 at 10:01 AM, Robert Burrell Donkin <[email protected]> wrote: > 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 > >> 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
flatten could be a static method in Mailbox for example. I'll try to refactor the code; if it does not work out nicely I'll postpone it to 0.7 or drop it entirely. >> 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. On second thought CharsetUtil seems to be the better choice. MessageUtils has static constants for charsets US_ASCII and LATIN 1. The method isAscii() is charset related, of course. One could argue about isWhitespace() and constants like CR and LF but I think CharsetUtil would be a good place for those, too. Markus --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
