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:03 UTC

[commons-bcel] 34/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 1e967ff9e8e3f3413a2ffb8efa7c65ffc2f3b468
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun May 1 08:32:53 2022 -0400

    Clean up: else { if { ... } } -> else if { ... }
---
 .../bcel/verifier/structurals/LocalVariables.java       | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java b/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
index 59b49c93..56ff4cdb 100644
--- a/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
+++ b/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
@@ -176,18 +176,15 @@ public class LocalVariables implements Cloneable {
                 }
                 locals[i] = sup;
             }
-        }
-        else{
-            if (! locals[i].equals(lv.locals[i]) ) {
+        } else if (! locals[i].equals(lv.locals[i]) ) {
 /*TODO
-                if ((locals[i] instanceof org.apache.bcel.generic.ReturnaddressType) &&
-                    (lv.locals[i] instanceof org.apache.bcel.generic.ReturnaddressType)) {
-                    //System.err.println("merging "+locals[i]+" and "+lv.locals[i]);
-                    throw new AssertionViolatedException("Merging different ReturnAddresses: '"+locals[i]+"' and '"+lv.locals[i]+"'.");
-                }
-*/
-                locals[i] = Type.UNKNOWN;
+            if ((locals[i] instanceof org.apache.bcel.generic.ReturnaddressType) &&
+                (lv.locals[i] instanceof org.apache.bcel.generic.ReturnaddressType)) {
+                //System.err.println("merging "+locals[i]+" and "+lv.locals[i]);
+                throw new AssertionViolatedException("Merging different ReturnAddresses: '"+locals[i]+"' and '"+lv.locals[i]+"'.");
             }
+*/
+            locals[i] = Type.UNKNOWN;
         }
         } catch (final ClassNotFoundException e) {
         // FIXME: maybe not the best way to handle this