mbeckerle commented on a change in pull request #276: Updated Unordered
Sequence code to better support vCard
URL: https://github.com/apache/incubator-daffodil/pull/276#discussion_r334553007
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/SequenceParserBases.scala
##########
@@ -227,12 +227,18 @@ abstract class SequenceParserBase(
pstate.setSuccess()
isDone = true
}
+
+ // We successfully parsed a discriminator, but failed to parse the
discriminated content.
+ // Do not continue trying to parse other memebers of the unordered
sequence.
+ case DiscriminatedFailure if (!isOrdered) => isDone = true
Review comment:
If I am correct above and DiscriminatedFailure is only for unordered case,
then I think the if(!isUnordered) should not be a conditional branch here, but
an Assert.invariant(isUnordered) before the assignment of isDone = true.
----------------------------------------------------------------
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