[ https://issues.apache.org/jira/browse/DAFFODIL-2075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Adams reassigned DAFFODIL-2075: ------------------------------------ Assignee: Josh Adams > 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: Josh Adams > 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 (v7.6.3#76005)