stevedlawrence commented on a change in pull request #237: Fixes DAFFODIL-2142
URL: https://github.com/apache/incubator-daffodil/pull/237#discussion_r295012887
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dsom/ModelGroup.scala
 ##########
 @@ -44,7 +44,7 @@ object ModelGroupFactory {
 
   /**
    * Because of the contexts where this is used, we return a list. That lets 
users
-   * flatmap it to get a collection of model groups. Nil for non-model groups, 
non-Nil for the model group
+   * flatmap it to get a collection of model groups. It will return non-Nil 
for the model group
    * object. There should be only one non-Nil.
 
 Review comment:
   Is seems like this isn't the case anymore. It looks like it can never return 
non-Nil.  I think it previously returned Nil when the child passed in was not a 
model group (eg.. annotation, comment, textNode). But with this change, it's 
always either a seq, a choice, or a group. So should this now just return a 
ModelGroup? And callers can Map insead of flatMap?

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