Author: ggregory
Date: Fri Aug 25 16:28:06 2017
New Revision: 1806195

URL: http://svn.apache.org/viewvc?rev=1806195&view=rev
Log:
Convert control statement bodies to block.

Modified:
    
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java

Modified: 
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java?rev=1806195&r1=1806194&r2=1806195&view=diff
==============================================================================
--- 
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java
 (original)
+++ 
commons/proper/bcel/trunk/src/test/java/org/apache/bcel/LocalVariableTypeTableTestCase.java
 Fri Aug 25 16:28:06 2017
@@ -71,8 +71,9 @@ public class LocalVariableTypeTableTestC
 
         for (int i = 0; i < methods.length; i++) {
             Method method = methods[i];
-            if (!method.isNative() && !method.isAbstract())
+            if (!method.isNative() && !method.isAbstract()) {
                 methods[i] = injection(clazz, method, cp, 
findFirstStringLocalVariableOffset(method));
+            }
         }
 
         clazz.setConstantPool(cp.getFinalConstantPool());
@@ -96,16 +97,18 @@ public class LocalVariableTypeTableTestC
     }
 
     public InstructionList makeWillBeAddedInstructionList(MethodGen methodGen, 
int firstStringOffset) {
-        if (firstStringOffset == -1)
+        if (firstStringOffset == -1) {
             return new InstructionList();
+        }
 
         LocalVariableGen localVariableGen = 
methodGen.getLocalVariables()[firstStringOffset];
         Instruction instruction;
 
-        if (localVariableGen != null)
+        if (localVariableGen != null) {
             instruction = new ALOAD(localVariableGen.getIndex());
-        else
+        } else {
             instruction = new ACONST_NULL();
+        }
 
         return createPrintln(methodGen.getConstantPool(), instruction);
     }
@@ -128,10 +131,11 @@ public class LocalVariableTypeTableTestC
 
         for (int i = 0, count = argumentTypes.length; i < count; i++) {
             if 
(Type.STRING.getSignature().equals(argumentTypes[i].getSignature())) {
-                if (method.isStatic())
+                if (method.isStatic()) {
                     offset = i;
-                else
+                } else {
                     offset = i + 1;
+                }
 
                 break;
             }


Reply via email to