some bugs

Kai Müller <[email protected]>
Newsgroups gmane.comp.java.classpath.extensions.javamail
Message-ID <[email protected]>
maybe im wrong or they are  fixed, but ... forward it if nessecary ... 
sorry ..

file:package gnu.inet.smtp.SMTPConnection
$Id: SMTPConnection.java,v 1.15 2004/08/07 14:39:46 dog Exp $
-------------------------
1. think SP should be characker #23 ()space and not " SP "
2. in methodes
     - public boolean mailFrom (String reversePath, ParameterList 
parameters)
     - rcptTo (String forwardPath, ParameterList parameters)

     extendet parameters should be a list of key=value pairs  and not 
call to Object.toString() of a list(am i missing something?). imho a map 
would more naturally represent this kind of data instad of a list of 
Parameter Classes ?
8<-------------------------------------------------------------------------
/**
     * @param map a Map of Key - Value pairs
     * @return Key-Value - pairs as psace separated an key=value pairs
     */
    public String mapToParams(Map map) {
        String result="";
        String key,value;
        if(map==null)
            return "";
        for(Iterator i=map.keySet().iterator();i.hasNext(); ) {
            key=(String)i.next();
            value=(String) map.get(key);
            result+=(" "+key+"="+value);
        }
      
        return result;
    }
8<------------------------------------------------------------------------------------------------
in file gnu.inet.util.MessageOutputStream
 $Id: MessageOutputStream.java,v 1.3 2004/06/08 19:05:28 dog Exp $
stuffing is imho wrong implemented. you ar checking for <LF>#46<LF>, but 
should check for <CRLF>#46 and <LF>#46 otherwise imho dots will be lost 
in transmision.
instead of  af a <LF> you schoud use a  <CRLF> to get it rfc conform.
you should test linelength >1000 octeds such lines must be splitted. or 
propagate these errors

 500 Line too long.
 501 Path too long
 552 Too many recipients.
 552 Too much mail data.

to the next layer.(imho you shoud propagate all not haneled errors to 
the next layer transparently to give them a chance to find out what the 
problem was .....
----------------------
maybe i' got somtehing wrong, please forward as appropriate.
kai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.