craigmcc    02/04/06 16:27:32

  Modified:    beanutils/src/java/org/apache/commons/beanutils
                        BeanUtils.java
  Log:
  Restore the previous BeanUtils.populate() behavior of simply ignoring property
  names in the map that do not exist.  Otherwise, Struts based apps (which use
  this to populate the form bean) will have lots of problems.
  
  Revision  Changes    Path
  1.19      +7 -10     
jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/BeanUtils.java
  
  Index: BeanUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/BeanUtils.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- BeanUtils.java    6 Apr 2002 23:34:29 -0000       1.18
  +++ BeanUtils.java    7 Apr 2002 00:27:32 -0000       1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/BeanUtils.java,v
 1.18 2002/04/06 23:34:29 craigmcc Exp $
  - * $Revision: 1.18 $
  - * $Date: 2002/04/06 23:34:29 $
  + * $Header: 
/home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/BeanUtils.java,v
 1.19 2002/04/07 00:27:32 craigmcc Exp $
  + * $Revision: 1.19 $
  + * $Date: 2002/04/07 00:27:32 $
    *
    * ====================================================================
    *
  @@ -87,7 +87,7 @@
    * @author Chris Audley
    * @author Rey François
    * @author Gregor Raıman
  - * @version $Revision: 1.18 $ $Date: 2002/04/06 23:34:29 $
  + * @version $Revision: 1.19 $ $Date: 2002/04/07 00:27:32 $
    */
   
   public class BeanUtils {
  @@ -560,8 +560,7 @@
                   target =
                       PropertyUtils.getProperty(bean, name.substring(0, delim));
               } catch (NoSuchMethodException e) {
  -                throw new InvocationTargetException
  -                    (e, "Cannot retrieve " + name.substring(0, delim));
  +                return; // Skip this property setter
               }
               name = name.substring(delim + 1);
               if (log.isTraceEnabled()) {
  @@ -605,8 +604,7 @@
               DynaClass dynaClass = ((DynaBean) target).getDynaClass();
               DynaProperty dynaProperty = dynaClass.getDynaProperty(propName);
               if (dynaProperty == null) {
  -                throw new IllegalArgumentException
  -                    ("No DynaPropertyDescriptor for " + propName);
  +                return; // Skip this property setter
               }
               type = dynaProperty.getType();
           } else {
  @@ -615,8 +613,7 @@
                   descriptor =
                       PropertyUtils.getPropertyDescriptor(target, name);
               } catch (NoSuchMethodException e) {
  -                throw new IllegalArgumentException
  -                    ("No PropertyDescriptor for " + name);
  +                return; // Skip this property setter
               }
               if (descriptor instanceof IndexedPropertyDescriptor) {
                   type = ((IndexedPropertyDescriptor) descriptor).
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to