ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44009] - MailLogger failed to send e-mail
Date Sat, 23 Feb 2008 14:28:28 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<https://issues.apache.org/bugzilla/show_bug.cgi?id=44009>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

https://issues.apache.org/bugzilla/show_bug.cgi?id=44009





------- Additional Comments From kevin.glynn@gmail.com  2008-02-23 06:28 -------
(In reply to comment #2)
> line 216 is the iterator below, at least in SVN_HEAD:
> 
>             msg.addHeader("Date", getDate());
> 
>             for (Iterator iter = headers.iterator(); iter.hasNext();) {
>                 Header h = (Header) iter.next();
>                 msg.addHeader(h.getName(), h.getValue());
>             }
> 
> An NPE could be triggered by headers==null. There's nothing in the class
> initialiser to set up these headers; it relies on setHeaders() being called,
> which presumably, it isnt in this case, or the vector is being set with a null
> pointer)
> 
> I'll do two things
> -always initialise the vector
> -skip the iteration if the vector is null (in case someone assigns a null vector

This happens if you are calling the mailer from the MailLogger, i.e.:

 ant -logger org.apache.tools.ant.listener.MailLogger fred

MailLogger.sendMimeMail doesn't set the headers.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Mime
View raw message