vincenzo    2004/07/27 08:12:57

  Modified:    src/java/org/apache/james/transport/matchers
                        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
  1.8       +3 -1      
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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AttachmentFileNameIs.java 16 Jul 2004 13:46:16 -0000      1.7
  +++ AttachmentFileNameIs.java 27 Jul 2004 15:12:57 -0000      1.8
  @@ -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