Re: Mail 1.0 tar ball problems
Fernando Nasser <[email protected]>
| Newsgroups | gmane.comp.java.classpath.extensions.javamail |
|---|---|
| Organization | Red Hat Canada |
| Message-ID | <[email protected]> |
Hi Chris, Thank you very much for the fixes. I am trying to obtain a complete list of API discrepancies. Regards, Fernando Chris Burdess wrote: > Fernando Nasser wrote: > >> Problem #1 >> >> >> It seems there are differences with javamail reference implementation. >> >> In Appendix A of javamail >> (http://java.sun.com/products/javamail/JavaMail-1.2.pdf) >> >> If mail.smtp.host is not define, it uses mail.host and if the >> property is not defined, it uses by default local machine. >> (page 67). >> >> But it seems that with GNU javamail, it is required : >> Unexpected Exception No SMTP host set (mail.smtp.host) >> javax.mail.MessagingException: No SMTP host set (mail.smtp.host) >> gnu.mail.providers.smtp.SMTPTransport.protocolConnect(Unknown Source) > > > Now fixed in CVS HEAD. > >> Problem #2: >> >> There is also other failure on the API : >> >> With sun reference implementation : >> $ java -cp mail.jar:. mail.TestJavaMail >> Test Passed. >> >> With gnu javamail : >> $ java -cp gnu-mail.jar:. mail.TestJavaMail >> javax.mail.internet.AddressException: Missing final @domain in string >> Florent >> at javax.mail.internet.InternetAddress.validate(Unknown Source) >> at javax.mail.internet.InternetAddress.<init>(Unknown Source) >> at javax.mail.internet.InternetAddress.<init>(Unknown Source) >> at mail.TestJavaMail.main(TestJavaMail.java:44) >> Test Failed ! > > > The documentation clearly states that the InternetAddress(String) > constructor is equivalent to calling the InternetAddress(String, > boolean) constructor with the second parameter set true. However, if in > the given test program, the constructor is replaced with the boolean > version with the second parameter set true, it fails with Sun's > implementation. Therefore there is either a problem with the API > documentation or a bug in Sun's implementation. > >> Problem (or problems) #3: >> >> Also, there are other problems on the signature of the gnu javamail >> API which is not compliant with the javamail API >> >> I can give you an example : >> Class javax.mail.Service, method queueEvent :* >> >> *http://java.sun.com/j2ee/1.4/docs/api/javax/mail/ >> Service.html#queueEvent(javax.mail.event.MailEvent,%20java.util.Vector) >> (or for 1.3 : >> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/mail/ >> Service.html#queueEvent(javax.mail.event.MailEvent,%20java.util.Vector) >> >> >> Then in GNU classpath : >> http://savannah.gnu.org/cgi-bin/viewcvs/classpathx/mail/source/javax/ >> mail/Service.java?rev=1.9&content-type=text/vnd.viewcvs-markup >> >> No queueEvent method. >> >> >> Another issue : >> http://java.sun.com/j2ee/1.4/docs/api/javax/mail/Multipart.html#parts >> Here parts is a Vector. >> >> And in GNU Classpath, it is a List : >> >> /** >> * List of BodyPart objects. >> */ >> protected List parts; >> >> http://savannah.gnu.org/cgi-bin/viewcvs/classpathx/mail/source/javax/ >> mail/Multipart.java?rev=1.7&content-type=text/vnd.viewcvs-markup > > > The above two issues are fixed. The first was due to the fact that this > API change between JavaMail 1.1 and later versions was not documented > in the changelog. The second was my fault, sorry about that. > >> There are other signatures problems. It was just some examples of >> failures. > > > I can't fix things I don't know about. Please report the other issues, > otherwise they won't get fixed. -- Fernando Nasser Red Hat Canada Ltd. E-Mail: [email protected] 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9