[ 
https://issues.apache.org/jira/browse/BEANUTILS-329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647452#action_12647452
 ] 

Niall Pemberton commented on BEANUTILS-329:
-------------------------------------------

I must be missing something - why do you want to add two new methods to 
BeanUtils that just delegate to existing methods in PropertyUtils?

Why can't you just use that method directly?

{code}
               Object obj = PropertyUtils.getNestedProperty(bean, name);
{code}

> get return for a Object
> -----------------------
>
>                 Key: BEANUTILS-329
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-329
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.0-BETA
>         Environment: eclipse,tomcat
>            Reporter: china m.t.xiatian 11602011,my 
> book's《JavaScript高级应用与实践》http://www.china-pub.com/39669
>             Fix For: Nightly Builds
>
>   Original Estimate: 2400h
>  Remaining Estimate: 2400h
>
> {code}
> // X-UI org/apache/commons/beanutils/BeanUtils.java add by china m.t.xiatian 
> 11602011 start
>       public static Object getPropertyForObject(Object bean, String name)
>                       throws IllegalAccessException, 
> InvocationTargetException,
>                       NoSuchMethodException {
>               return BeanUtilsBean.getInstance().getPropertyForObject(bean, 
> name);
>       }
>   // X-UI org/apache/commons/beanutils/BeanUtils.java add by china 
> m.t.xiatian 11602011 end
> {code}
> {code}
> // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china 
> m.t.xiatian 11602011 start
>       public Object getNestedPropertyForObject(Object bean, String name)
>                       throws IllegalAccessException, 
> InvocationTargetException,
>                       NoSuchMethodException {
>               return getPropertyUtils().getNestedProperty(bean, name);
>       }
>       public Object getPropertyForObject(Object bean, String name)
>                       throws IllegalAccessException, 
> InvocationTargetException,
>                       NoSuchMethodException {
>               return (getNestedPropertyForObject(bean, name));
>       }
>     // X-UI org/apache/commons/beanutils/BeanUtilsBean.java add by china 
> m.t.xiatian 11602011 end
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to