dims 2003/03/04 03:57:48
Modified: java/src/org/apache/axis/utils BeanUtils.java
java/src/org/apache/axis/description TypeDesc.java
Log:
Fix for Bug 17588 - Bean without own but inherit properties ignors order of elements
(includes fix)
Revision Changes Path
1.20 +1 -1 xml-axis/java/src/org/apache/axis/utils/BeanUtils.java
Index: BeanUtils.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/BeanUtils.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- BeanUtils.java 20 Feb 2003 18:29:36 -0000 1.19
+++ BeanUtils.java 4 Mar 2003 11:57:47 -0000 1.20
@@ -253,7 +253,7 @@
// If typeDesc meta data exists, re-order according to the fields
if (typeDesc != null &&
- typeDesc.getFields() != null) {
+ typeDesc.getFields(true) != null) {
ArrayList ordered = new ArrayList();
// Add the TypeDesc elements first
FieldDesc[] fds = typeDesc.getFields(true);
1.31 +10 -4 xml-axis/java/src/org/apache/axis/description/TypeDesc.java
Index: TypeDesc.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/TypeDesc.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- TypeDesc.java 3 Mar 2003 16:55:49 -0000 1.30
+++ TypeDesc.java 4 Mar 2003 11:57:48 -0000 1.31
@@ -190,10 +190,16 @@
FieldDesc [] parentFields = superDesc.getFields(true);
// START FIX http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17188
if (parentFields != null) {
- FieldDesc [] ret = new FieldDesc[parentFields.length +
fields.length];
- System.arraycopy(parentFields, 0, ret, 0,
parentFields.length);
- System.arraycopy(fields, 0, ret, parentFields.length,
fields.length);
- fields = ret;
+ if (fields != null) {
+ FieldDesc [] ret = new FieldDesc[parentFields.length +
fields.length];
+ System.arraycopy(parentFields, 0, ret, 0,
parentFields.length);
+ System.arraycopy(fields, 0, ret, parentFields.length,
fields.length);
+ fields = ret;
+ } else {
+ FieldDesc [] ret = new FieldDesc[parentFields.length];
+ System.arraycopy(parentFields, 0, ret, 0,
parentFields.length);
+ fields = ret;
+ }
}
// END FIX http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17188
}