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 2021/05/20 12:35:09 UTC
[jira] [Closed] (DAFFODIL-2075) dfdl:hexBinary does not correcty
reduce xs:integer
[ https://issues.apache.org/jira/browse/DAFFODIL-2075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Thompson closed DAFFODIL-2075.
-----------------------------------
Closed due to no activity and no re-occurrence. If the issue re-occurs the ticket can be reopened or addressed in a new one.
> dfdl:hexBinary does not correcty reduce xs:integer
> --------------------------------------------------
>
> Key: DAFFODIL-2075
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2075
> Project: Daffodil
> Issue Type: Bug
> Components: Back End
> Affects Versions: 2.3.0
> Reporter: Steve Lawrence
> Assignee: Dave Thompson
> Priority: Major
> Fix For: 2.4.0
>
>
> When the parameter to {{dfdl:hexBInary}} is an xs:integer, it is supposed to create 1, 2, 4, or 8 bytes based on the value of the xs:integer. But if the value is greater than Short.MaxValue, it uses 8 bytes, regardless if it would fit in 4 bytes.
> For example
> {code}
> dfdl:hexBinary(xs:integer(32768)))
> {code}
> returns {{0000000000008000}} but should return {{00008000}}. It looks like the reduce function in XSHexBinary.scala does the right thing to reduce the value to an Integer, but then the wrong toHexBinary function is called in HexBinaryConversions.scala.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)