You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2021/02/05 12:57:04 UTC

[GitHub] [incubator-daffodil] stevedlawrence commented on pull request #481: ADD test for "%%" to bypass existing test for "%NL"

stevedlawrence commented on pull request #481:
URL: https://github.com/apache/incubator-daffodil/pull/481#issuecomment-774016926


   > I removed "distinct" from the code because I was getting this compile error:
   > value distinct is not a member of Iterator[String]
   
   Scala 2.12 doesn't have the ``distinct`` function on the ``Iterator`` trait. The easiest way to get around this to to just convert the ``Iterator`` to a ``Seq``. This list will always be small enough (or even zero length in most cases) that this conversion shouldn't matter performance-wise.
   
   ``scala
   val matchedGroups = disallowedRegex.findAllMatchIn(raw).map { _.group(1) }.toSeq.distinct
   ```


----------------------------------------------------------------
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:
users@infra.apache.org