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 38076] - [dbutils] Setting bean properties fails silently
Date Fri, 30 Dec 2005 10:23: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=38076>.
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=38076





------- Additional Comments From ebourg@apache.org  2005-12-30 11:23 -------
The javadoc for the method BeanProcessor.toBean() states: 

"The column type can be converted to the property's set method parameter type
with a ResultSet.get* method. If the conversion fails (ie. the property was an
int and the column was a Timestamp) an SQLException is thrown."

So I guess the right behavior in the case you mention would be to throw an
exception.

An alternative would be to try a conversion (long->int) and cast an exception
only if it's not possible (because the value overflows).


-- 
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