[ 
https://issues.apache.org/jira/browse/DAFFODIL-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Lawrence resolved DAFFODIL-2349.
--------------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Fixed in commit 2d8eba2cd8dcb39c9d04ba530d92ec4ecb05f23b

> totalDigits valiation broken when totalDigits >= 10
> ---------------------------------------------------
>
>                 Key: DAFFODIL-2349
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2349
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>    Affects Versions: 2.6.0
>            Reporter: Steve Lawrence
>            Priority: Major
>              Labels: beginner
>             Fix For: 3.0.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The checkTotalDigits logic works by creating a {{BigInteger}} that is 
> {{10^^totalDigits^}}, and then comparing the infoset unscaledValue to that 
> number.
> Unfortunately, we then get the {{intValue}} of that number, which means if 
> {{10^^totalDigits^}} is ever greater than an int value, Daffodil will throw 
> an AritchmeticException. This will happen when totalDigits >= 10.
> I think this is also broken if the dataValue is negative. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to