axis-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1134438 - in /axis/axis2/java/core/trunk/modules: adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java kernel/src/org/apache/axis2/client/Stub.java
Date Fri, 10 Jun 2011 20:51:13 GMT
Author: veithen
Date: Fri Jun 10 20:51:13 2011
New Revision: 1134438

URL: http://svn.apache.org/viewvc?rev=1134438&view=rev
Log:
Fixed a couple of incorrect iterator usages, including AXIS2-5071.

Modified:
    axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java

Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java?rev=1134438&r1=1134437&r2=1134438&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java
(original)
+++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/MultirefHelper.java
Fri Jun 10 20:51:13 2011
@@ -93,6 +93,7 @@ public class MultirefHelper {
                 while (itrChild.hasNext()) {
                     Object obj = itrChild.next();
                     if (obj instanceof OMNode) {
+                        itrChild.remove();
                         omElement.addChild((OMNode)obj);
                     }
                 }
@@ -245,7 +246,8 @@ public class MultirefHelper {
                     OMNode omNode = null;
                     for (Iterator iter = clonedReferenceElement.getChildren(); iter.hasNext();)
{
                         omNode = (OMNode) iter.next();
-                        elementToProcess.addChild(omNode.detach());
+                        iter.remove();
+                        elementToProcess.addChild(omNode);
                     }
 
                     // add attributes

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java?rev=1134438&r1=1134437&r2=1134438&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/client/Stub.java Fri Jun
10 20:51:13 2011
@@ -212,6 +212,7 @@ public abstract class Stub {
         // add child elements
         for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();){
              omNode = (OMNode) iter.next();
+             iter.remove();
              soapHeaderBlock.addChild(omNode);
         }
 



Mime
View raw message