stevedlawrence commented on a change in pull request #55: Fixes the issue of
separated empty optional elements, (ie. 1:2::4:5).
URL: https://github.com/apache/incubator-daffodil/pull/55#discussion_r175467892
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/RepParsers.scala
##########
@@ -249,7 +249,7 @@ class RepUnboundedParser(occursCountKind:
OccursCountKind.Value, rParser: Parser
var priorState: PState.Mark = null
var markLeakCausedByException = false
- Assert.invariant(initialState.processorStatus eq Success)
+ if (initialState.processorStatus ne Success) return
Review comment:
Want to avoid returns. Scala implements them as throws which are relatively
heavy. Can we instead just wrap the call to parseAllRepeats with the
if(initialState.processorStatus ne Success) check?
Also, can you explain why this happens? It seems if the initial state of a
RepParser is not Success, we never should have enetered the RepParser in the
first place. Maybe there's a bug elsewhere?
----------------------------------------------------------------
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