ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1173598 - /webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
Date Wed, 21 Sep 2011 12:38:58 GMT
Author: dkulp
Date: Wed Sep 21 12:38:57 2011
New Revision: 1173598

URL: http://svn.apache.org/viewvc?rev=1173598&view=rev
Log:
[XMLSCHEMA-16] Fix issue of order of the union memberTypes

Modified:
    webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java

Modified: webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java?rev=1173598&r1=1173597&r2=1173598&view=diff
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
(original)
+++ webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
Wed Sep 21 12:38:57 2011
@@ -2142,7 +2142,7 @@ public class XmlSchemaSerializer {
             QName[] memberTypesQNames = unionObj.getMemberTypesQNames();
             if (memberTypesQNames != null && memberTypesQNames.length > 0) {
                 StringBuilder memberTypes = new StringBuilder();
-                for (int i = memberTypesQNames.length - 1; i >= 0; i--) {
+                for (int i = 0, n = memberTypesQNames.length - 1; i <= n; i++) {
                     QName memberTypesQName = memberTypesQNames[i];
                     String namespace = memberTypesQName.getNamespaceURI();
                     if (namespace.length() != 0) {
@@ -2152,7 +2152,7 @@ public class XmlSchemaSerializer {
                         }
                     }
                     memberTypes.append(memberTypesQName.getLocalPart());
-                    if (i != 0) {
+                    if (i != n) {
                       memberTypes.append(' ');
                     }
                 }



Mime
View raw message