jadams-tresys commented on a change in pull request #433:
URL: https://github.com/apache/incubator-daffodil/pull/433#discussion_r504633049
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/HexBinaryLengthParsers.scala
##########
@@ -36,6 +36,9 @@ sealed abstract class HexBinaryLengthParser(override val
context: ElementRuntime
val nBits = getLengthInBits(start).toInt
if (nBits == 0) {
currentElement.setDataValue(zeroLengthArray)
+ } else if (nBits < 0) {
+ // Integer overflow occurred, recommend using blob instead of hexBinary
+ PE(start, "Data is too large for xs:hexBinary. Consider using blobs
instead:
https://cwiki.apache.org/confluence/display/DAFFODIL/Proposal%3A+Binary+Large+Objects")
Review comment:
I understand the hesitancy, but I figured that most people wouldn't be
familiar with blobs and thought that the link might be the best way to point
them in the right direction.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]