Author: mukulg
Date: Wed Jun  9 05:09:54 2010
New Revision: 952903

URL: http://svn.apache.org/viewvc?rev=952903&view=rev
Log:
doing some improvements to the type comparison logic (was getting NPE in 
XSSerializer). sorry for the late commit

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSTypeHelper.java

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSTypeHelper.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSTypeHelper.java?rev=952903&r1=952902&r2=952903&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSTypeHelper.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/util/XSTypeHelper.java
 Wed Jun  9 05:09:54 2010
@@ -41,8 +41,14 @@ public class XSTypeHelper {
                   (type1Ns == null && typeDefn2.getNamespace() == null)) {
            nsEqual = true;   
         }
-        if (nsEqual == true && type1Name.equals(typeDefn2.getName())) {
-           typesIdentical = true;   
+        
+        if (nsEqual == true) {
+           if ((type1Name == null && typeDefn2.getName() == null) ||
+               (type1Name != null && type1Name.equals(typeDefn2.getName()))
+               && (schemaTypesIdentical(typeDefn1.getBaseType(),
+                                        typeDefn2.getBaseType()))) {
+               typesIdentical = true;   
+           }
         }
         
         return typesIdentical;



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to