mbeckerle commented on code in PR #1338:
URL: https://github.com/apache/daffodil/pull/1338#discussion_r1909607293


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/ElementBaseGrammarMixin.scala:
##########
@@ -1341,7 +1356,13 @@ trait ElementBaseGrammarMixin
       case LengthKind.Delimited => body
       case LengthKind.Pattern => new SpecifiedLengthPattern(this, body)
       case LengthKind.Explicit if bitsMultiplier != 0 =>
-        new SpecifiedLengthExplicit(this, body, bitsMultiplier)
+        if (isSimpleType && primType == PrimType.HexBinary) {
+          // hexBinary has some checks that need to be done that 
SpecifiedLengthExplicit
+          // gets in the way of
+          body
+        } else {
+          new SpecifiedLengthExplicit(this, body, bitsMultiplier)
+        }
       case LengthKind.Explicit => {
         Assert.invariant(!knownEncodingIsFixedWidth)
         Assert.invariant(lengthUnits eq LengthUnits.Characters)

Review Comment:
   Suggest create a cleanup issue ticket for this. It's a performance (and 
maintainability) improvement but not specifically about this PR's primary goal 
is it?



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to