You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by fa...@apache.org on 2023/05/30 09:09:20 UTC

svn commit: r1910135 - /xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/inst2xsd/RussianDollStrategy.java

Author: fanningpj
Date: Tue May 30 09:09:20 2023
New Revision: 1910135

URL: http://svn.apache.org/viewvc?rev=1910135&view=rev
Log:
[XMLBEANS-637] issue in RussianDollStrategy with comparing QNames

Modified:
    xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/inst2xsd/RussianDollStrategy.java

Modified: xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/inst2xsd/RussianDollStrategy.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/inst2xsd/RussianDollStrategy.java?rev=1910135&r1=1910134&r2=1910135&view=diff
==============================================================================
--- xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/inst2xsd/RussianDollStrategy.java (original)
+++ xmlbeans/trunk/src/main/java/org/apache/xmlbeans/impl/inst2xsd/RussianDollStrategy.java Tue May 30 09:09:20 2023
@@ -208,7 +208,7 @@ public class RussianDollStrategy
                 continue;
             }
 
-            if (currentElem.getName() == child.getName()) {   // same contiguos element
+            if (currentElem.getName() != null && currentElem.getName().equals(child.getName())) {   // same contiguous element
                 combineTypes(currentElem.getType(), child.getType(), options); // unify types
                 combineElementComments(currentElem, child);
                 // minOcc=0 maxOcc=unbounded
@@ -220,7 +220,7 @@ public class RussianDollStrategy
                     checkIfElementReferenceIsNeeded(child, parentNamespace, typeSystemHolder, options);
                     elemType.addElement(child);
                     elemNamesToElements.put(child.getName(), child);
-                } else {   //same non contiguos
+                } else {   //same non contiguous
                     combineTypes(currentElem.getType(), child.getType(), options);
                     combineElementComments(currentElem, child);
                     elemType.setTopParticleForComplexOrMixedContent(Type.PARTICLE_CHOICE_UNBOUNDED);



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