commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject cvs commit: jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read BeanBindAction.java
Date Tue, 27 Apr 2004 20:00:54 GMT
rdonkin     2004/04/27 13:00:54

  Modified:    betwixt/src/java/org/apache/commons/betwixt/io/read Tag:
                        REFACTORING-BRANCH_2004-01-13 BeanBindAction.java
  Log:
  Added support for array property setters
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.12  +11 -5     jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/Attic/BeanBindAction.java
  
  Index: BeanBindAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/betwixt/src/java/org/apache/commons/betwixt/io/read/Attic/BeanBindAction.java,v
  retrieving revision 1.1.2.11
  retrieving revision 1.1.2.12
  diff -u -r1.1.2.11 -r1.1.2.12
  --- BeanBindAction.java	18 Apr 2004 19:47:22 -0000	1.1.2.11
  +++ BeanBindAction.java	27 Apr 2004 20:00:54 -0000	1.1.2.12
  @@ -236,6 +236,9 @@
           // Maybe should move the current mapping into the context
           ElementMapping mapping = new ElementMapping();
           Class beanClass = descriptor.getSingularPropertyType();
  +        if (beanClass != null && beanClass.isArray()) {
  +            beanClass = beanClass.getComponentType();
  +        }
   
           // TODO: beanClass can be deduced from descriptor
           // so probably 
  @@ -267,6 +270,9 @@
           Log log = context.getLog();
           Class beanClass = propertyDescriptor.getSingularPropertyType();
           if (beanClass != null && !Map.class.isAssignableFrom(beanClass)) {
  +            if (beanClass.isArray()) {
  +                beanClass = beanClass.getComponentType();
  +            }
               if (log.isTraceEnabled()) {
                   log.trace("Filling descriptor for: " + beanClass);
               }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message