cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r831680 - /cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
Date Sun, 01 Nov 2009 14:14:30 GMT
Author: bimargulies
Date: Sun Nov  1 14:14:30 2009
New Revision: 831680

URL: http://svn.apache.org/viewvc?rev=831680&view=rev
Log:
CXF-2365: sorts props in name order to get consistent behavior in Aegis.

Modified:
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java?rev=831680&r1=831679&r2=831680&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanTypeInfo.java
Sun Nov  1 14:14:30 2009
@@ -23,6 +23,8 @@
 import java.beans.Introspector;
 import java.beans.PropertyDescriptor;
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -300,6 +302,11 @@
         if (descriptors == null) {
             descriptors = new PropertyDescriptor[0];
         }
+        Arrays.sort(descriptors, new Comparator<PropertyDescriptor>() {
+            public int compare(PropertyDescriptor o1, PropertyDescriptor o2) {
+                return o1.getName().compareTo(o2.getName());
+            }
+        });
     }
 
     private PropertyDescriptor[] getInterfacePropertyDescriptors(Class<?> clazz) {



Mime
View raw message