axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r688008 - /webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Date Fri, 22 Aug 2008 07:41:21 GMT
Author: nandana
Date: Fri Aug 22 00:41:21 2008
New Revision: 688008

URL: http://svn.apache.org/viewvc?rev=688008&view=rev
Log:
AXIS2-3974 Applying Detelin's patch with some minor changes, thanks Detelin. 

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=688008&r1=688007&r2=688008&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Fri Aug 22 00:41:21 2008
@@ -351,6 +351,12 @@
                 }
             }
 
+            // check for nil attribute:
+            QName nilAttName = new QName(Constants.XSI_NAMESPACE, Constants.NIL, "xsi");
+            if (beanElement.getAttribute(nilAttName) != null) {
+            	return null;
+            }
+            
             if (beanClass.isArray()) {
                 ArrayList valueList = new ArrayList();
                 Class arrayClassType = beanClass.getComponentType();
@@ -369,9 +375,8 @@
                             Object obj = deserialize(arrayClassType,
                                     omElement,
                                     objectSupplier, arrayLocalName);
-                            if (obj != null) {
-                                valueList.add(obj);
-                            }
+                            
+                            	valueList.add(obj);
                         }
                     }
                     return ConverterUtil.convertToArray(arrayClassType, valueList);



Mime
View raw message