You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rd...@apache.org on 2004/10/17 16:01:04 UTC

cvs commit: jakarta-commons/beanutils/src/java/org/apache/commons/beanutils BeanUtilsBean.java

rdonkin     2004/10/17 07:01:04

  Modified:    beanutils/src/java/org/apache/commons/beanutils
                        BeanUtilsBean.java
  Log:
  Added warning about describe behaviour to the javadocs. Related to issue #31019.
  
  Revision  Changes    Path
  1.17      +17 -1     jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/BeanUtilsBean.java
  
  Index: BeanUtilsBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/BeanUtilsBean.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- BeanUtilsBean.java	28 Feb 2004 13:18:33 -0000	1.16
  +++ BeanUtilsBean.java	17 Oct 2004 14:01:04 -0000	1.17
  @@ -465,6 +465,22 @@
        * properties, modulo differences for read-only and write-only
        * properties, but only if there are no indexed properties.</p>
        *
  +     * <p><strong>Warning:</strong> if any of the bean property implementations
  +     * contain (directly or indirectly) a call to this method then 
  +     * a stack overflow may result. For example:
  +     * <code><pre>
  +     * class MyBean
  +     * {
  +     *    public Map getParameterMap()
  +     *    {
  +     *         BeanUtils.describe(this);
  +     *    }
  +     * }
  +     * </pre></code>
  +     * will result in an infinite regression when <code>getParametersMap</code>
  +     * is called. It is recommended that such methods are given alternative
  +     * names (for example, <code>parametersMap</code>).
  +     * </p>
        * @param bean Bean whose properties are to be extracted
        *
        * @exception IllegalAccessException if the caller does not have
  
  
  

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