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:46:05 UTC

[commons-bcel] 36/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 cf6cb9cefe0f872059d9b7843c489afe713c2c8f
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun May 1 08:33:24 2022 -0400

    Clean up: else { if { ... } } -> else if { ... }
---
 src/main/java/org/apache/bcel/generic/MethodGen.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/apache/bcel/generic/MethodGen.java b/src/main/java/org/apache/bcel/generic/MethodGen.java
index e25369e9..f6a35f99 100644
--- a/src/main/java/org/apache/bcel/generic/MethodGen.java
+++ b/src/main/java/org/apache/bcel/generic/MethodGen.java
@@ -1066,12 +1066,10 @@ public class MethodGen extends FieldGenOrMethodGen {
                 // conditional branches have a fall through case, selects don't, and
                 // jsr/jsr_w return to the next instruction.
                 branchTargets.push(branch.getTarget(), stackDepth);
-            } else {
-                // check for instructions that terminate the method.
-                if (opcode == Const.ATHROW || opcode == Const.RET
-                        || opcode >= Const.IRETURN && opcode <= Const.RETURN) {
-                    ih = null;
-                }
+            } else // check for instructions that terminate the method.
+            if (opcode == Const.ATHROW || opcode == Const.RET
+                    || opcode >= Const.IRETURN && opcode <= Const.RETURN) {
+                ih = null;
             }
             // normal case, go to the next instruction.
             if (ih != null) {