axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis Message.java
Date Sat, 26 Apr 2003 23:09:06 GMT
dims        2003/04/26 16:09:06

  Modified:    java/src/org/apache/axis Message.java
  Log:
  Fix for SAAJ TCK failure - SAAJ API mandates an empty iterator when there are no attachments
(instead of null)
  
  Revision  Changes    Path
  1.98      +4 -3      xml-axis/java/src/org/apache/axis/Message.java
  
  Index: Message.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Message.java,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- Message.java	22 Apr 2003 19:34:00 -0000	1.97
  +++ Message.java	26 Apr 2003 23:09:06 -0000	1.98
  @@ -74,6 +74,7 @@
   import java.lang.reflect.Constructor;
   import java.lang.reflect.InvocationTargetException;
   import java.util.Iterator;
  +import java.util.Collections;
   
   /**
    * A complete SOAP (and/or XML-RPC, eventually) message.
  @@ -562,13 +563,13 @@
        */
       public Iterator getAttachments(){
           try {
  -					 	if (mAttachments != null && 0 != mAttachments.getAttachmentCount()) {
  +            if (mAttachments != null && 0 != mAttachments.getAttachmentCount())
{
              		return mAttachments.getAttachments().iterator();
  -					   }
  +			}
           } catch (AxisFault af){
               log.error(Messages.getMessage("exception00"), af);
           }
  -        return null;
  +        return Collections.EMPTY_LIST.iterator();
       }
   
       /**
  
  
  

Mime
View raw message