commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32251] New: - org.apache.commons.beanutils.ConvertingWrapDynaBean exception handling
Date Mon, 15 Nov 2004 18:34:50 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32251>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32251

           Summary: org.apache.commons.beanutils.ConvertingWrapDynaBean
                    exception handling
           Product: Commons
           Version: Nightly Builds
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Bean Utilities
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: mrxtravis@yahoo.com


I received an error java.lang.IllegalArgumentException: Property 'filesIterator'
has no write method when in fact the bean did have a setFilesIterator method. 
This happend because there was a NullPointerException in the filesIterator.  The
exception thrown did not report the initial cause nor log the error.

The class org.apache.commons.beanutils.ConvertingWrapDynaBean catches Throwable
and does not propogate the initial cause which makes finding some error hard. 
Attached is a patch that fixes this.

===================================================================
RCS file:
/home/cvspublic/jakarta-commons/beanutils/src/java/org/apache/commons/beanutils/ConvertingWrapDyn
aBean.java,v
retrieving revision 1.7
diff -d -r1.7 ConvertingWrapDynaBean.java
18a19,20
> import java.lang.reflect.InvocationTargetException;
>
70,71c72,73
<         } catch (Throwable t) {
<             throw new IllegalArgumentException
---
>         } catch (InvocationTargetException t) {
>             IllegalArgumentException e = new IllegalArgumentException
72a75,76
>             e.initCause(t);
>             throw e;

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message