vincenzo    2004/07/27 08:05:08

  Modified:    src/java/org/apache/james/transport/matchers Tag:
                        branch_2_1_fcs AttachmentFileNameIs.java
  Log:
  Fixes JAMES-312: AttachmentFileNameIs matcher may throw an Exception examining a 
multipart/alternative message. Such messages do not have attachments and so the 
matcher should simply fail.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.7   +4 -2      
james-server/src/java/org/apache/james/transport/matchers/AttachmentFileNameIs.java
  
  Index: AttachmentFileNameIs.java
  ===================================================================
  RCS file: 
/home/cvs/james-server/src/java/org/apache/james/transport/matchers/AttachmentFileNameIs.java,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- AttachmentFileNameIs.java 16 Jul 2004 12:24:59 -0000      1.1.2.6
  +++ AttachmentFileNameIs.java 27 Jul 2004 15:05:08 -0000      1.1.2.7
  @@ -148,7 +148,9 @@
            * if there is an attachment and no inline text,
            * the content type can be anything
            */
  -        if (part.getContentType() == null) {
  +        
  +        if (part.getContentType() == null ||
  +            part.getContentType().startsWith("multipart/alternative")) {
               return false;
           }
           
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to