Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/metron/pull/1268#discussion_r234289745
  
    --- Diff: 
metron-stellar/stellar-common/src/main/java/org/apache/metron/stellar/common/StellarCompiler.java
 ---
    @@ -219,14 +220,23 @@ public Object apply(ExpressionState state) {
                   //short circuit the if/then/else
                   instanceDeque.pop();
                   if((Boolean)curr.getValue()) {
    -                //choose then
    -                skipElse = true;
    +                //choose then.  Need to make sure we're keeping track of 
nesting.
    +                skipElseCount++;
                   } else {
                     //choose else
    +                // Need to count in case we see another if-else, to avoid 
breaking on wrong else.
    +                int innerIfCount = 0;
                     while (it.hasNext()) {
                       Token<?> t = it.next();
    +                  if (t.getUnderlyingType() == IfExpr.class) {
    +                    innerIfCount++;
    +                  }
    --- End diff --
    
    wouldn't if, else if be more clear here?


---

Reply via email to