stevedlawrence commented on a change in pull request #29: Fixed bug in
calculating bit length for delimited unparsing
URL: https://github.com/apache/incubator-daffodil/pull/29#discussion_r163658481
##########
File path:
daffodil-runtime1-unparser/src/main/scala/edu/illinois/ncsa/daffodil/processors/unparsers/BCDUnparsers.scala
##########
@@ -94,7 +101,7 @@ final class BCDDecimalMinLengthInBytesUnparser(
extends BCDDecimalBaseUnparser(e, binaryDecimalVirtualPoint) {
override def getBitLength(state: ParseOrUnparseState): Int = {
- val len =
state.currentNode.get.asSimple.dataValue.asInstanceOf[Array[Byte]].length * 8
+ val len =
(state.currentNode.get.asSimple.dataValue.asInstanceOf[JBigDecimal].precision *
8) / 2
Review comment:
Do you want the same thing mentioned above here?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services