You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2020/06/23 23:17:00 UTC

[jira] [Closed] (DAFFODIL-2349) totalDigits valiation broken when totalDigits >= 10

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

Dave Thompson closed DAFFODIL-2349.
-----------------------------------

Verified the specified commit (commit 2d8eba2cd8dcb39c9d04ba530d92ec4ecb05f23b) is included in the latest pull from the incubator-daffodil repository.

Verified the incubator-daffodil sbt test suites execute successfully.

Modified added tests to verify function.

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