stevedlawrence commented on a change in pull request #332: Refactor isHidden
URL: https://github.com/apache/incubator-daffodil/pull/332#discussion_r397987021
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/grammar/GrammarTerm.scala
 ##########
 @@ -94,16 +94,19 @@ abstract class Gram(contextArg: SchemaComponent)
    * Note: This should not evaluate the argument unless it has to.
    */
   def ~(qq: => Gram) = {
-    lazy val q = qq.deref
+    val q = qq.deref
     val self = this.deref
 
     val res =
       if (self.isEmpty) {
-        if (q.isEmpty)
+        if (q.isEmpty) {
           EmptyGram
-        else q
-      } else if (q.isEmpty) self
-      else {
+        } else {
+          q
+        }
+      } else if (q.isEmpty) {
+        self
 
 Review comment:
   I think this is the only change here? I'm not sure I understandt this 
change. What issue does this fix?

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