You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/01 12:45:34 UTC

[commons-bcel] 05/49: Clean up: else { if { ... } } -> else if { ... }

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git

commit ee90f2566ac6ead1ea2881d14ab97828923b64ea
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun May 1 08:16:36 2022 -0400

    Clean up: else { if { ... } } -> else if { ... }
---
 src/examples/Mini/ASTExpr.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/examples/Mini/ASTExpr.java b/src/examples/Mini/ASTExpr.java
index 4e0c1de6..80678e38 100644
--- a/src/examples/Mini/ASTExpr.java
+++ b/src/examples/Mini/ASTExpr.java
@@ -161,9 +161,7 @@ implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constan
     } else {
         child_type = type = T_BOOLEAN; // !
     }
-    }
-    else {
-      // Compute expected type
+    } else // Compute expected type
       if((kind == PLUS) || (kind == MINUS) || (kind == MULT) ||
        (kind == MOD)  || (kind == DIV)) {
         child_type = type = T_INT;
@@ -173,7 +171,6 @@ implements MiniParserConstants, MiniParserTreeConstants, org.apache.bcel.Constan
         child_type = T_INT;
         type       = T_BOOLEAN;
       }
-    }
 
     // Get type of subexpressions
     for (final ASTExpr expr : exprs) {