geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick McGuire (JIRA)" <...@geronimo.apache.org>
Subject [jira] Created: (GERONIMO-1558) InternetHeaders not handling setHeader(String name, Address[] addresses) properly.
Date Tue, 31 Jan 2006 11:28:33 GMT
InternetHeaders not handling setHeader(String name, Address[] addresses) properly. 
-----------------------------------------------------------------------------------

         Key: GERONIMO-1558
         URL: http://issues.apache.org/jira/browse/GERONIMO-1558
     Project: Geronimo
        Type: Bug
  Components: mail  
    Versions: 1.0    
    Reporter: Rick McGuire


The method setHeader(String name, Address[] addresses) inserts the new header into the header
list without lowercasing the name.  This results in the added header not being retrieveable
later.  This manifests as a failure in MimeMessage.getAllRecipients() if the recipients have
been added with MimeMessage.setRecipients().  Here's a simple example:

       InternetAddress[] recipients = InternetAddress.parse(to, false);
       System.out.println("Adding " + recipients.length + " recipients to message");

       msg.setRecipients(Message.RecipientType.TO, recipients);

       Address[] msgRecipients = msg.getAllRecipients();

       System.out.println("Message reports having " + msgRecipients.length + " recipients");


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message