axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/encoding/ser BeanPropertyTarget.java
Date Sat, 11 Jun 2005 14:19:08 GMT
dims        2005/06/11 07:19:08

  Modified:    java/src/org/apache/axis/encoding/ser
                        BeanPropertyTarget.java
  Log:
  Fix for AXIS-1413 - Axis deserialization of Arrays
  from Vikram Roopchand
  
  Revision  Changes    Path
  1.24      +11 -0     ws-axis/java/src/org/apache/axis/encoding/ser/BeanPropertyTarget.java
  
  Index: BeanPropertyTarget.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/BeanPropertyTarget.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- BeanPropertyTarget.java	27 Apr 2005 16:33:16 -0000	1.23
  +++ BeanPropertyTarget.java	11 Jun 2005 14:19:07 -0000	1.24
  @@ -83,6 +83,17 @@
                   // see it the value can be converted into
                   // the expected type.
                   Class type = pd.getType();
  +
  +
  +                if (value.getClass().isArray() 
  +                        && value.getClass().getComponentType().isPrimitive()
  +                        && type.isArray() 
  +                        && type.getComponentType().equals(Object.class))
  +                {
  +                    //we make our own array type here.
  +                    type = Array.newInstance(JavaUtils.getWrapperClass(value.getClass().getComponentType()),0).getClass();
  +                }
  +
                   if (JavaUtils.isConvertable(value, type)) {
                       value = JavaUtils.convert(value, type);
                       if (index < 0)
  
  
  

Mime
View raw message