cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1530388 - /cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Date Tue, 08 Oct 2013 19:07:35 GMT
Author: dkulp
Date: Tue Oct  8 19:07:35 2013
New Revision: 1530388

URL: http://svn.apache.org/r1530388
Log:
Merged revisions 1530387 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1530387 | dkulp | 2013-10-08 15:03:52 -0400 (Tue, 08 Oct 2013) | 3 lines

  [CXF-5322] Fix warning for propOrder
  Patch from  Lars Geidel applied

........

Modified:
    cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java

Modified: cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=1530388&r1=1530387&r2=1530388&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Tue Oct  8 19:07:35 2013
@@ -578,13 +578,16 @@ class JAXBSchemaInitializer extends Serv
             seq.getItems().add(exEle);
         }
         
-        if (propertyOrder != null && propertyOrder.length == seq.getItems().size())
{
-            sortItems(seq, propertyOrder);
-        } else if (propertyOrder != null && propertyOrder.length != seq.getItems().size())
{
-            LOG.log(Level.WARNING, "propOrder in @XmlType doesn't define all schema elements
:" 
-                + Arrays.toString(propertyOrder));
+        if (propertyOrder != null) {
+            if (propertyOrder.length == seq.getItems().size()) {
+                sortItems(seq, propertyOrder);
+            } else if (propertyOrder.length > 1 
+                || (propertyOrder.length == 1 && !propertyOrder[0].isEmpty())) {
+                LOG.log(Level.WARNING, "propOrder in @XmlType doesn't define all schema elements
:" 
+                    + Arrays.toString(propertyOrder));
+            }
         }
-        
+            
         if (xmlAccessorOrder != null && xmlAccessorOrder.value().equals(XmlAccessOrder.ALPHABETICAL)
             && propertyOrder == null) {
             sort(seq);



Mime
View raw message