commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf Hauser (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BEANUTILS-224) [beanutils] provide better error message for "argument type mismatch"
Date Tue, 22 Apr 2008 07:05:21 GMT

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

Ralf Hauser commented on BEANUTILS-224:
---------------------------------------

BTW, the Bug 38704  is now STR-2778

> [beanutils] provide better error message for "argument type mismatch"
> ---------------------------------------------------------------------
>
>                 Key: BEANUTILS-224
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-224
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>         Environment: Operating System: All
> Platform: Other
>            Reporter: Ralf Hauser
>            Priority: Minor
>             Fix For: 1.8.0
>
>         Attachments: PropertyUtilsBean.patch
>
>
> In <<Object org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(Method
> method, Object bean, Object[] values) throws IllegalAccessException,
> InvocationTargetException>> 
> the throw block should rather be:
>             throw new IllegalArgumentException(
>                 "Cannot invoke " + method.getDeclaringClass().getName() + "." 
>                 + method.getName() + " - " + e.getMessage() + " - found " + 
>                 bean.getClass().getName()+ " but expected "
>                 +  (values[0]).getClass().getName());
> see also In <<Object org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(Method
> method, Object bean, Object[] values) throws IllegalAccessException,
> InvocationTargetException>> 
> the throw block should rather be:
>             throw new IllegalArgumentException(
>                 "Cannot invoke " + method.getDeclaringClass().getName() + "." 
>                 + method.getName() + " - " + e.getMessage() + " - found " + 
>                 bean.getClass().getName()+ " but expected "
>                 +  (values[0]).getClass().getName());
> see also Bug 38163 for the context where this would have helped a lot. for the context
where this would have helped a lot.

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


Mime
View raw message