cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail MailMessageSender.java
Date Sun, 09 May 2004 18:10:33 GMT
haul        2004/05/09 11:10:33

  Modified:    src/blocks/mail/java/org/apache/cocoon/mail
                        MailMessageSender.java
  Log:
  fix missing variable initialization when using a source for the mail body
  reported by Nils K?ster <cocoon_list@lolili.de>
  move initializations to one place
  
  Revision  Changes    Path
  1.11      +4 -7      cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java
  
  Index: MailMessageSender.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/mail/java/org/apache/cocoon/mail/MailMessageSender.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- MailMessageSender.java	5 Mar 2004 13:02:00 -0000	1.10
  +++ MailMessageSender.java	9 May 2004 18:10:33 -0000	1.11
  @@ -268,7 +268,9 @@
                   }
               } else {
                   Multipart multipart = new MimeMultipart();
  -                BodyPart bodypart = null;
  +                BodyPart bodypart = new MimeBodyPart();
  +                multipart.addBodyPart(bodypart);
  +                this.message.setContent(multipart);
   
                   if (this.src != null) {
                       DataSource ds = null;
  @@ -288,14 +290,9 @@
                       bodypart.setDataHandler(new DataHandler(ds));
                       bodypart.setFileName(ds.getName());
   
  -                    multipart.addBodyPart(bodypart);
  -
                   } else if (this.body != null) {
  -                    bodypart = new MimeBodyPart();
                       bodypart.setText(this.body);
  -                    multipart.addBodyPart(bodypart);
                   }
  -                this.message.setContent(multipart);
   
                   for (Iterator i = this.attachmentList.iterator(); i.hasNext();) {
                       a = (Attachment) i.next();
  
  
  

Mime
View raw message