cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r548387 - /incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
Date Mon, 18 Jun 2007 16:03:19 GMT
Author: dkulp
Date: Mon Jun 18 09:03:17 2007
New Revision: 548387

URL: http://svn.apache.org/viewvc?view=rev&rev=548387
Log:
Skip over attachments that have already been read.

Modified:
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java?view=diff&rev=548387&r1=548386&r2=548387
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/SwAInInterceptor.java
Mon Jun 18 09:03:17 2007
@@ -19,7 +19,9 @@
 package org.apache.cxf.jaxws.interceptors;
 
 import java.io.IOException;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import javax.activation.DataHandler;
 import javax.imageio.ImageIO;
@@ -66,6 +68,7 @@
             return;
         }
         
+        Set<Integer> foundAtts = new HashSet<Integer>();
         List<Object> inObjects = CastUtils.cast(message.getContent(List.class));
 
         for (MessagePartInfo mpi : sbi.getAttachments()) {
@@ -75,6 +78,10 @@
             boolean found = false;
             
             int idx = mpi.getMessageInfo().getMessagePartIndex(mpi);
+            if (foundAtts.contains(mpi.getIndex())) {
+                continue;
+            }
+            foundAtts.add(mpi.getIndex());
             
             for (Attachment a : message.getAttachments()) {
                 if (a.getId().startsWith(start)) {



Mime
View raw message