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_r175470802
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/grammar/primitives/PrimitivesElementKinds.scala
##########
@@ -113,22 +113,21 @@ case class SequenceCombinator(sq: SequenceTermBase,
rawTerms: Seq[Gram])
extends Terminal(sq, true) {
override lazy val isEmpty = {
- val rt = rawTerms
- val frt = rt.filterNot { _.isEmpty }
- val res = frt.isEmpty
+ val ft = terms.filterNot { _.isEmpty }
+ val res = ft.isEmpty
res
Review comment:
This looks odd to me. terms is ``rawTerms.filterNot { _.isEmpty }`` and then
you do ``terms.filterNot { _.isEmpty }``. Seems like that second filterNot will
do nothing, so can this just be ``val res = terms.isEmpty``?
----------------------------------------------------------------
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