[
https://issues.apache.org/jira/browse/BEANUTILS-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Niall Pemberton reopened BEANUTILS-23:
--------------------------------------
> [beanutils] Misleading error message in ConvertingWrapDynaBean
> --------------------------------------------------------------
>
> Key: BEANUTILS-23
> URL: https://issues.apache.org/jira/browse/BEANUTILS-23
> Project: Commons BeanUtils
> Issue Type: Bug
> Affects Versions: 1.7.0, Nightly Builds
> Environment: Operating System: other
> Platform: All
> Reporter: Aslak Hellesøy
> Priority: Minor
>
> ConvertingWrapDynaBean.set(String,Object) swallows any throwable and rethrows
> a
> (sometimes) misleading IllegalArgumentException without revealing the initial
> cause.
> There should be more catch clauses in the method, possibly catching some
> reflection exceptions. Anyway, the initial cause should be printStackTrace()d
> or included in the IllegalArgumentException.
> I discovered this when I tried to set a property in a bean with jelly, and my
> set method throws an exception:
> java.lang.IllegalArgumentException: Property 'expr' has no write method
> at org.apache.commons.beanutils.ConvertingWrapDynaBean.set
> (ConvertingWrapDynaBean.java:116)
> at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:275)
> at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
> at org.apache.commons.jelly.impl.DynamicTag.doTag(DynamicTag.java:113)
> at org.apache.commons.jelly.impl.StaticTagScript.run
> (StaticTagScript.java:151)
> at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
> (The setExpr(String) method is there allright, but it throws an exception if
> the input is bad.)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]