Jason, > Great! I will quite happily change the POP3 handler (and the other > repositories) if someone wants me to.
That would be great. :-) First we've one issue to resolve. I think that we're agreed on void remove(Collection). There seems to be a bit of a dispute over the contents of the Collection; whether to use String keys or Mail/MailImpl instances. Currently POP3Handler actually maintains the latter. If we were using JDK 1.5, it would be simple: we could have both, just as we currently have both: remove(MailImpl); remove(String); remove(Collection<MailImpl>); remove(Collection<String>); However, that is not presently an option. > My prefered option is Collection<String>. Much lighter and most > implementors (and users) of MailRepository use the keys to > access items anyway. True enough, and my initial thought. HOWEVER, at the moment the only client for this method is the POP3 handler, and that code is currently maintaining a Collection<MailImpl>, so using a lighter weight Collection<String> would require more code and memory, not less. FWIW, the remove method is always implemented based on the key. The version that takes a mail object uses getName() to get the key, and then calls the key-based method. But that doesn't mean that the key-based method couldn't have been protected. > No I don't think a redesign [of MailRepository] is needed. To elaborate, I was referring to the fact that we need to redesign or replace MailRepository to support IMAP, which is one reason why we've looked at JavaMail storage. > All we need is an agreed behaviour to deal with the exceptions. > The only time a runtime exception should be thrown is in the > event of a critical error (e.g. I can't open the repository at > all) rather than more internal issues (unable to find a message etc). Are you proposing that we add throws clauses to MailRepository during this change? What would you throw? We just need a nested exception. Choices include: - javax.mail.MessagingException - org.apache.avalon.framework.Cascading* - org.apache.commons.lang.exception.* Javadocs are below. --- Noel javadocs: Standard: http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Throwable.html http://java.sun.com/products/javamail/1.3/docs/javadocs/javax/mail/Messaging Exception.html http://avalon.apache.org/framework/api/index.html http://jakarta.apache.org/commons/lang/api/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]