craigmcc    01/04/16 08:33:17

  Modified:    src/share/org/apache/struts/util BeanUtils.java
  Log:
  Port a fix from the "commons" version of this module (which Struts will
  ultimately migrate to when the commons version is released).
  
  Revision  Changes    Path
  1.27      +10 -5     jakarta-struts/src/share/org/apache/struts/util/BeanUtils.java
  
  Index: BeanUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/util/BeanUtils.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- BeanUtils.java    2001/02/12 00:32:12     1.26
  +++ BeanUtils.java    2001/04/16 15:33:16     1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/BeanUtils.java,v 1.26 
2001/02/12 00:32:12 craigmcc Exp $
  - * $Revision: 1.26 $
  - * $Date: 2001/02/12 00:32:12 $
  + * $Header: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/util/BeanUtils.java,v 1.27 
2001/04/16 15:33:16 craigmcc Exp $
  + * $Revision: 1.27 $
  + * $Date: 2001/04/16 15:33:16 $
    *
    * ====================================================================
    *
  @@ -83,7 +83,7 @@
    * @author Craig R. McClanahan
    * @author Ralph Schaer
    * @author Chris Audley
  - * @version $Revision: 1.26 $ $Date: 2001/02/12 00:32:12 $
  + * @version $Revision: 1.27 $ $Date: 2001/04/16 15:33:16 $
    */
   
   public final class BeanUtils {
  @@ -268,7 +268,12 @@
        throws IllegalAccessException, InvocationTargetException,
               NoSuchMethodException {
   
  -        Object value = PropertyUtils.getIndexedProperty(bean, name);
  +        StringBuffer sb = new StringBuffer(name);
  +        sb.append(PropertyUtils.INDEXED_DELIM);
  +        sb.append(index);
  +        sb.append(PropertyUtils.INDEXED_DELIM2);
  +        Object value = PropertyUtils.getIndexedProperty(bean,
  +                                                        sb.toString());
           return (ConvertUtils.convert(value));
   
       }
  
  
  

Reply via email to