DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18811>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18811
Misleading error message in ConvertingWrapDynaBean
Summary: Misleading error message in ConvertingWrapDynaBean
Product: Commons
Version: Nightly Builds
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Bean Utilities
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: aslak.hellesoy@netcom.no
CC: jstrachan@apache.org
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.)
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
|