[ 
https://issues.apache.org/jira/browse/DERBY-5546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173249#comment-13173249
 ] 

Knut Anders Hatlen commented on DERBY-5546:
-------------------------------------------

I think the suggested changes are fine. Could the underflow check be factored 
out to a shared helper method?

I haven't tested, but I suspect the API comment about loss of precision in 
BigDecimal.floatValue() also refers to numbers like 1.00000(...)00001 being 
truncated to 1. Does/should updateBigDecimal() fail in that case too?
                
> ResultSet#updateBigDecimal on a REAL column does not do underflow checking
> --------------------------------------------------------------------------
>
>                 Key: DERBY-5546
>                 URL: https://issues.apache.org/jira/browse/DERBY-5546
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.8.2.2
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: MissingUnderflowCheck.java, derby-5546.diff, 
> derby-5546.stat
>
>
> In contrast, ResultSet#updateBigDecimal on a FLOAT or DOUBLE column gives the 
> expected error on underflow. Cf. the attached repro program 
> MissingUnderflowCheck.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to