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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to