You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ra...@apache.org on 2006/08/08 21:44:35 UTC

svn commit: r429792 - /xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/values/XmlComplexContentImpl.java

Author: radup
Date: Tue Aug  8 12:44:35 2006
New Revision: 429792

URL: http://svn.apache.org/viewvc?rev=429792&view=rev
Log:
Handled the case where the XmlObjects being copied by the array copy were immutable.

Modified:
    xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/values/XmlComplexContentImpl.java

Modified: xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/values/XmlComplexContentImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/values/XmlComplexContentImpl.java?rev=429792&r1=429791&r2=429792&view=diff
==============================================================================
--- xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/values/XmlComplexContentImpl.java (original)
+++ xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/values/XmlComplexContentImpl.java Tue Aug  8 12:44:35 2006
@@ -1068,6 +1068,8 @@
         int startSrc = 0, startDest = 0;
         for (i = 0; i < sources.length; i++)
         {
+            if (sources[i].isImmutable())
+                continue;
             XmlCursor c = sources[i].newCursor();
             if (c.toParent() && c.getObject() == this)
             {
@@ -1095,8 +1097,8 @@
                 }
                 for ( i++, j++; i < sources.length; i++, j++)
                 {
-                    XmlCursor c = sources[i].newCursor();
-                    if (c.toParent() && c.getObject() == this)
+                    XmlCursor c = sources[i].isImmutable() ? null : sources[i].newCursor();
+                    if (c != null && c.toParent() && c.getObject() == this)
                     {
                         c.dispose();
                         current = store.find_element_user( elemName, j );
@@ -1184,6 +1186,8 @@
         int startSrc = 0, startDest = 0;
         for (i = 0; i < sources.length; i++)
         {
+            if (sources[i].isImmutable())
+                continue;
             XmlCursor c = sources[i].newCursor();
             if (c.toParent() && c.getObject() == this)
             {
@@ -1211,8 +1215,8 @@
                 }
                 for ( i++, j++; i < sources.length; i++, j++)
                 {
-                    XmlCursor c = sources[i].newCursor();
-                    if (c.toParent() && c.getObject() == this)
+                    XmlCursor c = sources[i].isImmutable() ? null : sources[i].newCursor();
+                    if (c != null && c.toParent() && c.getObject() == this)
                     {
                         c.dispose();
                         current = store.find_element_user( set, j );



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org