mbeckerle commented on a change in pull request #214: Sequences and Separators 
Refactoring and Rewrite
URL: https://github.com/apache/incubator-daffodil/pull/214#discussion_r284807157
 
 

 ##########
 File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/BinaryNumberTraits.scala
 ##########
 @@ -107,12 +106,16 @@ trait PrefixedLengthParserMixin {
    * returning, indicating that the returned value is meaningless.
    */
   def getPrefixedLengthInBits(state: PState): Long = {
-    Assert.invariant(lengthUnits != LengthUnits.Characters)
     val lenInUnits = getPrefixedLengthInUnits(state)
-    if (lengthUnits == LengthUnits.Bytes) {
-      lenInUnits * 8
-    } else {
-      lenInUnits
+    lengthUnits match {
 
 Review comment:
   Is there a jira ticket for this - inability to support prefixLength in 
characters?  Because this fixes that, though not for variable-width encodings. 

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


With regards,
Apache Git Services

Reply via email to