commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1554577 - in /commons/proper/bcel/trunk/src: main/java/org/apache/bcel/classfile/ main/java/org/apache/bcel/generic/ main/java/org/apache/bcel/util/ test/java/org/apache/bcel/
Date Tue, 31 Dec 2013 22:06:10 GMT
Author: ggregory
Date: Tue Dec 31 22:06:09 2013
New Revision: 1554577

URL: http://svn.apache.org/r1554577
Log:
Convert control statement bodies to block.

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/SimpleElementValue.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/EnumElementValueGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ObjectType.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTFIELD.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTSTATIC.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/SimpleElementValueGen.java
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/FieldAnnotationsTestCase.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java
    commons/proper/bcel/trunk/src/test/java/org/apache/bcel/InstructionFinderTestCase.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/AnnotationElementValue.java Tue Dec 31 22:06:09 2013
@@ -29,9 +29,10 @@ public class AnnotationElementValue exte
                         ConstantPool cpool)
         {
                 super(type, cpool);
-                if (type != ANNOTATION)
-                        throw new RuntimeException(
-                                        "Only element values of type annotation can be built with this ctor - type specified: " + type);
+                if (type != ANNOTATION) {
+                    throw new RuntimeException(
+                                    "Only element values of type annotation can be built with this ctor - type specified: " + type);
+                }
                 this.annotationEntry = annotationEntry;
         }
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ArrayElementValue.java Tue Dec 31 22:06:09 2013
@@ -33,8 +33,9 @@ public class ArrayElementValue extends E
 		for (int i = 0; i < evalues.length; i++)
 		{
 			sb.append(evalues[i].toString());
-			if ((i + 1) < evalues.length)
-				sb.append(",");
+			if ((i + 1) < evalues.length) {
+                sb.append(",");
+            }
 		}
 		sb.append("}");
 		return sb.toString();
@@ -43,9 +44,10 @@ public class ArrayElementValue extends E
 	public ArrayElementValue(int type, ElementValue[] datums, ConstantPool cpool)
 	{
 		super(type, cpool);
-		if (type != ARRAY)
-			throw new RuntimeException(
+		if (type != ARRAY) {
+            throw new RuntimeException(
 					"Only element values of type array can be built with this ctor - type specified: " + type);
+        }
 		this.evalues = datums;
 	}
 
@@ -67,8 +69,9 @@ public class ArrayElementValue extends E
 		for (int i = 0; i < evalues.length; i++)
 		{
 			sb.append(evalues[i].stringifyValue());
-			if ((i + 1) < evalues.length)
-				sb.append(",");
+			if ((i + 1) < evalues.length) {
+                sb.append(",");
+            }
 		}
 		sb.append("]");
 		return sb.toString();

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/ConstantUtf8.java Tue Dec 31 22:06:09 2013
@@ -52,7 +52,7 @@ public final class ConstantUtf8 extends 
     final static boolean BCEL_DONT_CACHE = Boolean.getBoolean("bcel.dontCache");
 
     static {
-        if (BCEL_STATISTICS)
+        if (BCEL_STATISTICS) {
             Runtime.getRuntime().addShutdownHook(new Thread() {
                 public void run() {
                     System.err.println("Cache hit " + hits + "/" + considered +", "
@@ -60,6 +60,7 @@ public final class ConstantUtf8 extends 
                     System.err.println("Total of " + created + " ConstantUtf8 objects created");
                 }
             });
+        }
     }
 
     public static synchronized ConstantUtf8 getCachedInstance(String s) {

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnclosingMethod.java Tue Dec 31 22:06:09 2013
@@ -81,7 +81,9 @@ public class EnclosingMethod extends Att
 	}
 	
 	public final ConstantNameAndType getEnclosingMethod() {
-		if (methodIndex == 0) return null;
+		if (methodIndex == 0) {
+            return null;
+        }
 		ConstantNameAndType nat = 
 			(ConstantNameAndType)constant_pool.getConstant(methodIndex,Constants.CONSTANT_NameAndType);
 		return nat;

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/EnumElementValue.java Tue Dec 31 22:06:09 2013
@@ -32,9 +32,10 @@ public class EnumElementValue extends El
 			ConstantPool cpool)
 	{
 		super(type, cpool);
-		if (type != ENUM_CONSTANT)
-			throw new RuntimeException(
+		if (type != ENUM_CONSTANT) {
+            throw new RuntimeException(
 					"Only element values of type enum can be built with this ctor - type specified: " + type);
+        }
 		this.typeIdx = typeIdx;
 		this.valueIdx = valueIdx;
 	}

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/FieldOrMethod.java Tue Dec 31 22:06:09 2013
@@ -213,8 +213,9 @@ public abstract class FieldOrMethod exte
         c.constant_pool    = constant_pool;
         c.attributes       = new Attribute[attributes_count];
 
-        for(int i=0; i < attributes_count; i++)
-          c.attributes[i] = attributes[i].copy(constant_pool);
+        for(int i=0; i < attributes_count; i++) {
+            c.attributes[i] = attributes[i].copy(constant_pool);
+        }
 
         return c;
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/JavaClass.java Tue Dec 31 22:06:09 2013
@@ -345,8 +345,9 @@ public class JavaClass extends AccessFla
       		for (Attribute attribute : attrs) {
     			if (attribute instanceof Annotations) {				
     				Annotations runtimeAnnotations = (Annotations)attribute;
-    				for(int j = 0; j < runtimeAnnotations.getAnnotationEntries().length; j++)
-    					accumulatedAnnotations.add(runtimeAnnotations.getAnnotationEntries()[j]);
+    				for(int j = 0; j < runtimeAnnotations.getAnnotationEntries().length; j++) {
+                        accumulatedAnnotations.add(runtimeAnnotations.getAnnotationEntries()[j]);
+                    }
     			}
     		}
       		annotations = accumulatedAnnotations.toArray(new AnnotationEntry[accumulatedAnnotations.size()]);
@@ -649,8 +650,9 @@ public class JavaClass extends AccessFla
         AnnotationEntry[] annotations = getAnnotationEntries();
         if (annotations!=null && annotations.length>0) {
         	buf.append("\nAnnotation(s):\n");
-        	for (AnnotationEntry annotation : annotations)
+        	for (AnnotationEntry annotation : annotations) {
                 buf.append(indent(annotation));
+            }
         }
         if (fields.length > 0) {
             buf.append("\n").append(fields.length).append(" fields:\n");
@@ -726,7 +728,9 @@ public class JavaClass extends AccessFla
     }
     
     private final void computeNestedTypeStatus() {
-  	  if (computedNestedTypeStatus) return;
+  	  if (computedNestedTypeStatus) {
+        return;
+    }
   	  for (Attribute attribute : this.attributes) {
   			if (attribute instanceof InnerClasses) {
   				InnerClass[] innerClasses = ((InnerClasses) attribute).getInnerClasses();

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/LocalVariableTypeTable.java Tue Dec 31 22:06:09 2013
@@ -70,8 +70,9 @@ private int             local_variable_t
     local_variable_type_table_length = (dis.readUnsignedShort());
     local_variable_type_table = new LocalVariable[local_variable_type_table_length];
 
-    for(int i=0; i < local_variable_type_table_length; i++)
-      local_variable_type_table[i] = new LocalVariable(dis, cpool);
+    for(int i=0; i < local_variable_type_table_length; i++) {
+        local_variable_type_table[i] = new LocalVariable(dis, cpool);
+    }
   }
 
   @Override
@@ -84,8 +85,9 @@ public final void dump(DataOutputStream 
   {
     super.dump(file);
     file.writeShort(local_variable_type_table_length);
-    for(int i=0; i < local_variable_type_table_length; i++)
-      local_variable_type_table[i].dump(file);
+    for(int i=0; i < local_variable_type_table_length; i++) {
+        local_variable_type_table[i].dump(file);
+    }
   }
 
   public final LocalVariable[] getLocalVariableTypeTable() {
@@ -93,9 +95,11 @@ public final void dump(DataOutputStream 
   }    
 
   public final LocalVariable getLocalVariable(int index) {
-    for(int i=0; i < local_variable_type_table_length; i++)
-      if(local_variable_type_table[i].getIndex() == index)
-	return local_variable_type_table[i];
+    for(int i=0; i < local_variable_type_table_length; i++) {
+        if(local_variable_type_table[i].getIndex() == index) {
+            return local_variable_type_table[i];
+        }
+    }
 
     return null;
   }
@@ -117,7 +121,9 @@ public final String toString() {
     for(int i=0; i < local_variable_type_table_length; i++) {
       buf.append(local_variable_type_table[i].toString());
 
-      if(i < local_variable_type_table_length - 1) buf.append('\n');
+      if(i < local_variable_type_table_length - 1) {
+        buf.append('\n');
+    }
     }
 
     return buf.toString();
@@ -131,8 +137,9 @@ public Attribute copy(ConstantPool const
     LocalVariableTypeTable c = (LocalVariableTypeTable)clone();
 
     c.local_variable_type_table = new LocalVariable[local_variable_type_table_length];
-    for(int i=0; i < local_variable_type_table_length; i++)
-      c.local_variable_type_table[i] = local_variable_type_table[i].copy();
+    for(int i=0; i < local_variable_type_table_length; i++) {
+        c.local_variable_type_table[i] = local_variable_type_table[i].copy();
+    }
 
     c.constant_pool = constant_pool;
     return c;

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/SimpleElementValue.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/SimpleElementValue.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/SimpleElementValue.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/SimpleElementValue.java Tue Dec 31 22:06:09 2013
@@ -46,9 +46,10 @@ public class SimpleElementValue extends 
 
 	public String getValueString()
 	{
-		if (type != STRING)
-			throw new RuntimeException(
+		if (type != STRING) {
+            throw new RuntimeException(
 					"Dont call getValueString() on a non STRING ElementValue");
+        }
 		ConstantUtf8 c = (ConstantUtf8) cpool.getConstant(getIndex(),
 				Constants.CONSTANT_Utf8);
 		return c.getBytes();
@@ -56,9 +57,10 @@ public class SimpleElementValue extends 
 
 	public int getValueInt()
 	{
-		if (type != PRIMITIVE_INT)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_INT) {
+            throw new RuntimeException(
 					"Dont call getValueString() on a non STRING ElementValue");
+        }
 		ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
 				Constants.CONSTANT_Integer);
 		return c.getBytes();
@@ -66,9 +68,10 @@ public class SimpleElementValue extends 
 
 	public byte getValueByte()
 	{
-		if (type != PRIMITIVE_BYTE)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_BYTE) {
+            throw new RuntimeException(
 					"Dont call getValueByte() on a non BYTE ElementValue");
+        }
 		ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
 				Constants.CONSTANT_Integer);
 		return (byte) c.getBytes();
@@ -76,9 +79,10 @@ public class SimpleElementValue extends 
 
 	public char getValueChar()
 	{
-		if (type != PRIMITIVE_CHAR)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_CHAR) {
+            throw new RuntimeException(
 					"Dont call getValueChar() on a non CHAR ElementValue");
+        }
 		ConstantInteger c = (ConstantInteger) cpool.getConstant(getIndex(),
 				Constants.CONSTANT_Integer);
 		return (char) c.getBytes();
@@ -86,45 +90,50 @@ public class SimpleElementValue extends 
 
 	public long getValueLong()
 	{
-		if (type != PRIMITIVE_LONG)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_LONG) {
+            throw new RuntimeException(
 					"Dont call getValueLong() on a non LONG ElementValue");
+        }
 		ConstantLong j = (ConstantLong) cpool.getConstant(getIndex());
 		return j.getBytes();
 	}
 
 	public float getValueFloat()
 	{
-		if (type != PRIMITIVE_FLOAT)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_FLOAT) {
+            throw new RuntimeException(
 					"Dont call getValueFloat() on a non FLOAT ElementValue");
+        }
 		ConstantFloat f = (ConstantFloat) cpool.getConstant(getIndex());
 		return f.getBytes();
 	}
 
 	public double getValueDouble()
 	{
-		if (type != PRIMITIVE_DOUBLE)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_DOUBLE) {
+            throw new RuntimeException(
 					"Dont call getValueDouble() on a non DOUBLE ElementValue");
+        }
 		ConstantDouble d = (ConstantDouble) cpool.getConstant(getIndex());
 		return d.getBytes();
 	}
 
 	public boolean getValueBoolean()
 	{
-		if (type != PRIMITIVE_BOOLEAN)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_BOOLEAN) {
+            throw new RuntimeException(
 					"Dont call getValueBoolean() on a non BOOLEAN ElementValue");
+        }
 		ConstantInteger bo = (ConstantInteger) cpool.getConstant(getIndex());
 		return (bo.getBytes() != 0);
 	}
 
 	public short getValueShort()
 	{
-		if (type != PRIMITIVE_SHORT)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_SHORT) {
+            throw new RuntimeException(
 					"Dont call getValueShort() on a non SHORT ElementValue");
+        }
 		ConstantInteger s = (ConstantInteger) cpool.getConstant(getIndex());
 		return (short) s.getBytes();
 	}
@@ -172,10 +181,11 @@ public class SimpleElementValue extends 
 		case PRIMITIVE_BOOLEAN:
 			ConstantInteger bo = (ConstantInteger) cpool.getConstant(
 					getIndex(), Constants.CONSTANT_Integer);
-			if (bo.getBytes() == 0)
-				return "false";
-			else
-			    return "true";
+			if (bo.getBytes() == 0) {
+                return "false";
+            } else {
+                return "true";
+            }
 		case STRING:
 			ConstantUtf8 cu8 = (ConstantUtf8) cpool.getConstant(getIndex(),
 					Constants.CONSTANT_Utf8);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/classfile/Utility.java Tue Dec 31 22:06:09 2013
@@ -348,8 +348,9 @@ public abstract class Utility {
             case Constants.INVOKEVIRTUAL:
                 index = bytes.readUnsignedShort();
                 Constant c = constant_pool.getConstant(index);
-                if (c.getTag() != Constants.CONSTANT_Methodref && c.getTag() != Constants.CONSTANT_InterfaceMethodref)
-                	    throw new ClassFormatException("Expected class `CONSTANT_Methodref' or 'CONSTANT_InterfaceMethodref' at index " + index + " and got " +c);
+                if (c.getTag() != Constants.CONSTANT_Methodref && c.getTag() != Constants.CONSTANT_InterfaceMethodref) {
+                    throw new ClassFormatException("Expected class `CONSTANT_Methodref' or 'CONSTANT_InterfaceMethodref' at index " + index + " and got " +c);
+                }
                 buf.append("\t").append(
                         constant_pool.constantToString(c))
                         .append((verbose ? " (" + index + ")" : ""));
@@ -370,8 +371,9 @@ public abstract class Utility {
                 buf.append("\t").append("<dyn>.").append(
                         constant_pool
                                 .constantToString(id.getNameAndTypeIndex(), Constants.CONSTANT_NameAndType));
-                if (verbose)
-                        buf.append(" (" + index + "/" + id.getNameAndTypeIndex() +")");
+                if (verbose) {
+                    buf.append(" (" + index + "/" + id.getNameAndTypeIndex() +")");
+                }
                 break;
             /* Operands are references to items in constant pool
              */
@@ -1398,7 +1400,9 @@ public abstract class Utility {
      */
     public static Attribute[] getAnnotationAttributes(ConstantPoolGen cp,List<AnnotationEntryGen> vec) {
     	
-    	if (vec.isEmpty()) return new Attribute[0];
+    	if (vec.isEmpty()) {
+            return new Attribute[0];
+        }
     	
     	try {
     		int countVisible   = 0;
@@ -1406,10 +1410,11 @@ public abstract class Utility {
     	
     		//  put the annotations in the right output stream
     		for (AnnotationEntryGen a : vec) {
-    			if (a.isRuntimeVisible()) 
-    			    countVisible++;
-    			else			   
-    			    countInvisible++;
+    			if (a.isRuntimeVisible()) {
+                    countVisible++;
+                } else {
+                    countInvisible++;
+                }
     		}
     	
     		ByteArrayOutputStream rvaBytes = new ByteArrayOutputStream();
@@ -1422,10 +1427,11 @@ public abstract class Utility {
 
     		// put the annotations in the right output stream
     		for (AnnotationEntryGen a : vec) {
-    			if (a.isRuntimeVisible()) 
-    			    a.dump(rvaDos);
-    			else			   
-    			    a.dump(riaDos);
+    			if (a.isRuntimeVisible()) {
+                    a.dump(rvaDos);
+                } else {
+                    a.dump(riaDos);
+                }
     		}
 
       rvaDos.close();
@@ -1437,8 +1443,12 @@ public abstract class Utility {
       int rvaIndex = -1;
       int riaIndex = -1;
       
-      if (rvaData.length>2) rvaIndex = cp.addUtf8("RuntimeVisibleAnnotations");
-      if (riaData.length>2) riaIndex = cp.addUtf8("RuntimeInvisibleAnnotations");
+      if (rvaData.length>2) {
+        rvaIndex = cp.addUtf8("RuntimeVisibleAnnotations");
+    }
+      if (riaData.length>2) {
+        riaIndex = cp.addUtf8("RuntimeInvisibleAnnotations");
+    }
 
     	List<Attribute> newAttributes = new ArrayList<Attribute>();
     	if (rvaData.length>2) {
@@ -1496,8 +1506,9 @@ public abstract class Utility {
 				rvaDos.writeShort(visCount[i]);
 				if (visCount[i] > 0) {
 					for (AnnotationEntryGen element : vec[i]) {
-						if (element.isRuntimeVisible())
-							element.dump(rvaDos);
+						if (element.isRuntimeVisible()) {
+                            element.dump(rvaDos);
+                        }
 					}
 				}
 			}
@@ -1510,8 +1521,9 @@ public abstract class Utility {
 				riaDos.writeShort(invisCount[i]);
 				if (invisCount[i] > 0) {
 					for (AnnotationEntryGen element : vec[i]) {
-						if (!element.isRuntimeVisible())
-							element.dump(riaDos);
+						if (!element.isRuntimeVisible()) {
+                            element.dump(riaDos);
+                        }
 					}
 				}
 			}
@@ -1520,10 +1532,12 @@ public abstract class Utility {
 			byte[] riaData = riaBytes.toByteArray();
 			int rvaIndex = -1;
 			int riaIndex = -1;
-			if (totalVisCount > 0)
-				rvaIndex = cp.addUtf8("RuntimeVisibleParameterAnnotations");
-			if (totalInvisCount > 0)
-				riaIndex = cp.addUtf8("RuntimeInvisibleParameterAnnotations");
+			if (totalVisCount > 0) {
+                rvaIndex = cp.addUtf8("RuntimeVisibleParameterAnnotations");
+            }
+			if (totalInvisCount > 0) {
+                riaIndex = cp.addUtf8("RuntimeInvisibleParameterAnnotations");
+            }
 			List<Attribute> newAttributes = new ArrayList<Attribute>();
 			if (totalVisCount > 0) {
 				newAttributes

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationElementValueGen.java Tue Dec 31 22:06:09 2013
@@ -37,9 +37,10 @@ public class AnnotationElementValueGen e
 			ConstantPoolGen cpool)
 	{
 		super(type, cpool);
-		if (type != ANNOTATION)
-			throw new RuntimeException(
+		if (type != ANNOTATION) {
+            throw new RuntimeException(
 					"Only element values of type annotation can be built with this ctor - type specified: " + type);
+        }
 		this.a = annotation;
 	}
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/AnnotationEntryGen.java Tue Dec 31 22:06:09 2013
@@ -132,8 +132,9 @@ public class AnnotationEntryGen
 
 	public void addElementNameValuePair(ElementValuePairGen evp)
 	{
-		if (evs == null)
-			evs = new ArrayList<ElementValuePairGen>();
+		if (evs == null) {
+            evs = new ArrayList<ElementValuePairGen>();
+        }
 		evs.add(evp);
 	}
 
@@ -172,8 +173,9 @@ public class AnnotationEntryGen
 		for (int i = 0; i < evs.size(); i++)
 		{
 			s.append(evs.get(i));
-			if (i + 1 < evs.size())
-				s.append(",");
+			if (i + 1 < evs.size()) {
+                s.append(",");
+            }
 		}
 		s.append("}]");
 		return s.toString();
@@ -186,8 +188,9 @@ public class AnnotationEntryGen
 		for (int i = 0; i < evs.size(); i++)
 		{
 			s.append(evs.get(i));
-			if (i + 1 < evs.size())
-				s.append(",");
+			if (i + 1 < evs.size()) {
+                s.append(",");
+            }
 		}
 		s.append(")");
 		return s.toString();

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ArrayElementValueGen.java Tue Dec 31 22:06:09 2013
@@ -41,9 +41,10 @@ public class ArrayElementValueGen extend
 			ConstantPoolGen cpool)
 	{
 		super(type, cpool);
-		if (type != ARRAY)
-			throw new RuntimeException(
+		if (type != ARRAY) {
+            throw new RuntimeException(
 					"Only element values of type array can be built with this ctor - type specified: " + type);
+        }
 		this.evalues = new ArrayList<ElementValueGen>();
 		for (ElementValue datum : datums) {
 			evalues.add(ElementValueGen.copy(datum, cpool, true));

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/EnumElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/EnumElementValueGen.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/EnumElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/EnumElementValueGen.java Tue Dec 31 22:06:09 2013
@@ -39,9 +39,10 @@ public class EnumElementValueGen extends
 			ConstantPoolGen cpool)
 	{
 		super(ElementValueGen.ENUM_CONSTANT, cpool);
-		if (type != ENUM_CONSTANT)
-			throw new RuntimeException(
+		if (type != ENUM_CONSTANT) {
+            throw new RuntimeException(
 					"Only element values of type enum can be built with this ctor - type specified: " + type);
+        }
 		this.typeIdx = typeIdx;
 		this.valueIdx = valueIdx;
 	}

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETFIELD.java Tue Dec 31 22:06:09 2013
@@ -80,8 +80,9 @@ public class GETFIELD extends FieldInstr
         v.visitTypedInstruction(this);
         v.visitLoadClass(this);
         v.visitCPInstruction(this);
-        if (v instanceof VisitorSupportsInvokeDynamic) 
+        if (v instanceof VisitorSupportsInvokeDynamic) {
             ((VisitorSupportsInvokeDynamic)v).visitNameSignatureInstruction(this);
+        }
         v.visitFieldOrMethod(this);
         v.visitFieldInstruction(this);
         v.visitGETFIELD(this);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/GETSTATIC.java Tue Dec 31 22:06:09 2013
@@ -78,8 +78,9 @@ public class GETSTATIC extends FieldInst
         v.visitTypedInstruction(this);
         v.visitLoadClass(this);
         v.visitCPInstruction(this);
-        if (v instanceof VisitorSupportsInvokeDynamic) 
+        if (v instanceof VisitorSupportsInvokeDynamic) {
             ((VisitorSupportsInvokeDynamic)v).visitNameSignatureInstruction(this);
+        }
         v.visitFieldOrMethod(this);
         v.visitFieldInstruction(this);
         v.visitGETSTATIC(this);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEINTERFACE.java Tue Dec 31 22:06:09 2013
@@ -133,8 +133,9 @@ public final class INVOKEINTERFACE exten
         v.visitStackProducer(this);
         v.visitLoadClass(this);
         v.visitCPInstruction(this);
-        if (v instanceof VisitorSupportsInvokeDynamic) 
+        if (v instanceof VisitorSupportsInvokeDynamic) {
             ((VisitorSupportsInvokeDynamic)v).visitNameSignatureInstruction(this);
+        }
         v.visitFieldOrMethod(this);
         v.visitInvokeInstruction(this);
         v.visitINVOKEINTERFACE(this);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESPECIAL.java Tue Dec 31 22:06:09 2013
@@ -75,8 +75,9 @@ public class INVOKESPECIAL extends Invok
         v.visitStackProducer(this);
         v.visitLoadClass(this);
         v.visitCPInstruction(this);
-        if (v instanceof VisitorSupportsInvokeDynamic) 
+        if (v instanceof VisitorSupportsInvokeDynamic) {
             ((VisitorSupportsInvokeDynamic)v).visitNameSignatureInstruction(this);
+        }
         v.visitFieldOrMethod(this);
         v.visitInvokeInstruction(this);
         v.visitINVOKESPECIAL(this);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKESTATIC.java Tue Dec 31 22:06:09 2013
@@ -72,8 +72,9 @@ public class INVOKESTATIC extends Invoke
         v.visitStackProducer(this);
         v.visitLoadClass(this);
         v.visitCPInstruction(this);
-        if (v instanceof VisitorSupportsInvokeDynamic) 
+        if (v instanceof VisitorSupportsInvokeDynamic) {
             ((VisitorSupportsInvokeDynamic)v).visitNameSignatureInstruction(this);
+        }
         v.visitFieldOrMethod(this);
         v.visitInvokeInstruction(this);
         v.visitINVOKESTATIC(this);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/INVOKEVIRTUAL.java Tue Dec 31 22:06:09 2013
@@ -75,8 +75,9 @@ public class INVOKEVIRTUAL extends Invok
         v.visitLoadClass(this);
         v.visitCPInstruction(this);
         v.visitFieldOrMethod(this);
-        if (v instanceof VisitorSupportsInvokeDynamic) 
+        if (v instanceof VisitorSupportsInvokeDynamic) {
             ((VisitorSupportsInvokeDynamic)v).visitNameSignatureInstruction(this);
+        }
         v.visitInvokeInstruction(this);
         v.visitINVOKEVIRTUAL(this);
     }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/InstructionList.java Tue Dec 31 22:06:09 2013
@@ -1005,8 +1005,9 @@ public class InstructionList implements 
 
 
             public InstructionHandle next() throws NoSuchElementException {
-            	if (ih == null)
-            		throw new NoSuchElementException();
+            	if (ih == null) {
+                    throw new NoSuchElementException();
+                }
                 InstructionHandle i = ih;
                 ih = ih.next;
                 return i;

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java Tue Dec 31 22:06:09 2013
@@ -612,7 +612,9 @@ public class MethodGen extends FieldGenO
       }
       
       public void addParameterAnnotationsAsAttribute(ConstantPoolGen cp) {
-      	if (!hasParameterAnnotations) return;
+      	if (!hasParameterAnnotations) {
+            return;
+        }
       	Attribute[] attrs = Utility.getParameterAnnotationAttributes(cp,param_annotations);
       	if (attrs!=null) {
           for (Attribute attr : attrs) {
@@ -1086,7 +1088,9 @@ public class MethodGen extends FieldGenO
      */
     public List<AnnotationEntryGen> getAnnotationsOnParameter(int i) {
     	ensureExistingParameterAnnotationsUnpacked();
-    	if (!hasParameterAnnotations || i>arg_types.length) return null;
+    	if (!hasParameterAnnotations || i>arg_types.length) {
+            return null;
+        }
     	return param_annotations[i];
     }
     
@@ -1100,8 +1104,9 @@ public class MethodGen extends FieldGenO
 	 */
 	private void ensureExistingParameterAnnotationsUnpacked()
 	{
-		if (haveUnpackedParameterAnnotations)
-			return;
+		if (haveUnpackedParameterAnnotations) {
+            return;
+        }
 		// Find attributes that contain parameter annotation data
 		Attribute[] attrs = getAttributes();
 		ParameterAnnotations paramAnnVisAttr = null;
@@ -1113,15 +1118,17 @@ public class MethodGen extends FieldGenO
 				if (!hasParameterAnnotations)
 				{
 					param_annotations = new List[arg_types.length];
-					for (int j = 0; j < arg_types.length; j++)
-						param_annotations[j] = new ArrayList<AnnotationEntryGen>();
+					for (int j = 0; j < arg_types.length; j++) {
+                        param_annotations[j] = new ArrayList<AnnotationEntryGen>();
+                    }
 				}
 				hasParameterAnnotations = true;
 				ParameterAnnotations rpa = (ParameterAnnotations) attribute;
-				if (rpa instanceof RuntimeVisibleParameterAnnotations)
-					paramAnnVisAttr = rpa;
-				else
-					paramAnnInvisAttr = rpa;
+				if (rpa instanceof RuntimeVisibleParameterAnnotations) {
+                    paramAnnVisAttr = rpa;
+                } else {
+                    paramAnnInvisAttr = rpa;
+                }
 				for (int j = 0; j < arg_types.length; j++)
 				{
 					// This returns Annotation[] ...
@@ -1134,10 +1141,12 @@ public class MethodGen extends FieldGenO
 				}
 			}
 		}
-		if (paramAnnVisAttr != null)
-			removeAttribute(paramAnnVisAttr);
-		if (paramAnnInvisAttr != null)
-			removeAttribute(paramAnnInvisAttr);
+		if (paramAnnVisAttr != null) {
+            removeAttribute(paramAnnVisAttr);
+        }
+		if (paramAnnInvisAttr != null) {
+            removeAttribute(paramAnnInvisAttr);
+        }
 		haveUnpackedParameterAnnotations = true;
 	}
 

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ObjectType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ObjectType.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ObjectType.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/ObjectType.java Tue Dec 31 22:06:09 2013
@@ -40,7 +40,7 @@ public class ObjectType extends Referenc
     private static HashMap<String, ObjectType> cache;
 
     public synchronized static ObjectType getInstance(String class_name) {
-        if (cache == null)
+        if (cache == null) {
             cache = new LinkedHashMap<String, ObjectType>(INITIAL_CACHE_CAPACITY, 0.75f, true) {
 
 
@@ -49,8 +49,11 @@ public class ObjectType extends Referenc
             }
 
         };
+        }
         ObjectType result = cache.get(class_name);
-        if (result != null) return result;
+        if (result != null) {
+            return result;
+        }
         result = new ObjectType(class_name);
         cache.put(class_name, result);
         return result;

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTFIELD.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTFIELD.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTFIELD.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTFIELD.java Tue Dec 31 22:06:09 2013
@@ -79,8 +79,9 @@ public class PUTFIELD extends FieldInstr
         v.visitTypedInstruction(this);
         v.visitLoadClass(this);
         v.visitCPInstruction(this);
-        if (v instanceof VisitorSupportsInvokeDynamic) 
+        if (v instanceof VisitorSupportsInvokeDynamic) {
             ((VisitorSupportsInvokeDynamic)v).visitNameSignatureInstruction(this);
+        }
         v.visitFieldOrMethod(this);
         v.visitFieldInstruction(this);
         v.visitPUTFIELD(this);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTSTATIC.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTSTATIC.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTSTATIC.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/PUTSTATIC.java Tue Dec 31 22:06:09 2013
@@ -78,8 +78,9 @@ public class PUTSTATIC extends FieldInst
         v.visitTypedInstruction(this);
         v.visitLoadClass(this);
         v.visitCPInstruction(this);
-        if (v instanceof VisitorSupportsInvokeDynamic) 
+        if (v instanceof VisitorSupportsInvokeDynamic) {
             ((VisitorSupportsInvokeDynamic)v).visitNameSignatureInstruction(this);
+        }
         v.visitFieldOrMethod(this);
         v.visitFieldInstruction(this);
         v.visitPUTSTATIC(this);

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/SimpleElementValueGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/SimpleElementValueGen.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/SimpleElementValueGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/SimpleElementValueGen.java Tue Dec 31 22:06:09 2013
@@ -91,10 +91,11 @@ public class SimpleElementValueGen exten
 	public SimpleElementValueGen(int type, ConstantPoolGen cpGen, boolean value)
 	{
 		super(type, cpGen);
-		if (value)
-			idx = cpGen.addInteger(1);
-		else
-			idx = cpGen.addInteger(0);
+		if (value) {
+            idx = cpGen.addInteger(1);
+        } else {
+            idx = cpGen.addInteger(0);
+        }
 	}
 
 	public SimpleElementValueGen(int type, ConstantPoolGen cpGen, String value)
@@ -180,18 +181,20 @@ public class SimpleElementValueGen exten
 
 	public String getValueString()
 	{
-		if (type != STRING)
-			throw new RuntimeException(
+		if (type != STRING) {
+            throw new RuntimeException(
 					"Dont call getValueString() on a non STRING ElementValue");
+        }
 		ConstantUtf8 c = (ConstantUtf8) cpGen.getConstant(idx);
 		return c.getBytes();
 	}
 
 	public int getValueInt()
 	{
-		if (type != PRIMITIVE_INT)
-			throw new RuntimeException(
+		if (type != PRIMITIVE_INT) {
+            throw new RuntimeException(
 					"Dont call getValueString() on a non STRING ElementValue");
+        }
 		ConstantInteger c = (ConstantInteger) cpGen.getConstant(idx);
 		return c.getBytes();
 	}
@@ -225,10 +228,11 @@ public class SimpleElementValueGen exten
 			return Integer.toString(ch.getBytes());
 		case PRIMITIVE_BOOLEAN:
 			ConstantInteger bo = (ConstantInteger) cpGen.getConstant(idx);
-			if (bo.getBytes() == 0)
-				return "false";
-			else
-				return "true";
+			if (bo.getBytes() == 0) {
+                return "false";
+            } else {
+                return "true";
+            }
 		case STRING:
 			ConstantUtf8 cu8 = (ConstantUtf8) cpGen.getConstant(idx);
 			return cu8.getBytes();

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassPath.java Tue Dec 31 22:06:09 2013
@@ -86,8 +86,9 @@ public class ClassPath implements Serial
                         }
                     }
                 } catch (IOException e) {
-                    if (path.endsWith(".zip") || path.endsWith(".jar"))
+                    if (path.endsWith(".zip") || path.endsWith(".jar")) {
                         System.err.println("CLASSPATH component " + file + ": " + e);
+                    }
                 }
             }
         }
@@ -506,8 +507,9 @@ public class ClassPath implements Serial
         ClassFile getClassFile( String name, String suffix ) throws IOException {
             final ZipEntry entry = zip.getEntry(name.replace('.', '/') + suffix);
             
-            if (entry == null)
-            	return null;
+            if (entry == null) {
+                return null;
+            }
             
             return new ClassFile() {
 

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractCounterVisitorTestCase.java Tue Dec 31 22:06:09 2013
@@ -37,8 +37,9 @@ public abstract class AbstractCounterVis
 
 	public CounterVisitor getVisitor()
 	{
-		if (visitor == null)
-			visitor = new CounterVisitor();
+		if (visitor == null) {
+            visitor = new CounterVisitor();
+        }
 		return visitor;
 	}
 

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/AbstractTestCase.java Tue Dec 31 22:06:09 2013
@@ -93,10 +93,12 @@ public abstract class AbstractTestCase e
 		Attribute[] all = clazz.getAttributes();
 		List<Attribute> chosenAttrsList = new ArrayList<Attribute>();
 		for (Attribute element : all) {
-			if (verbose)
-				System.err.println("Attribute: " + element.getName());
-			if (element.getName().equals(name))
-				chosenAttrsList.add(element);
+			if (verbose) {
+                System.err.println("Attribute: " + element.getName());
+            }
+			if (element.getName().equals(name)) {
+                chosenAttrsList.add(element);
+            }
 		}
 		return chosenAttrsList.toArray(new Attribute[] {});
 	}
@@ -105,10 +107,12 @@ public abstract class AbstractTestCase e
 	{
 		List<Attribute> chosenAttrsList = new ArrayList<Attribute>();
 		for (Attribute element : all) {
-			if (verbose)
-				System.err.println("Attribute: " + element.getName());
-			if (element.getName().equals(name))
-				chosenAttrsList.add(element);
+			if (verbose) {
+                System.err.println("Attribute: " + element.getName());
+            }
+			if (element.getName().equals(name)) {
+                chosenAttrsList.add(element);
+            }
 		}
 		assertTrue("Should be one match: " + chosenAttrsList.size(),
 				chosenAttrsList.size() == 1);
@@ -123,8 +127,9 @@ public abstract class AbstractTestCase e
 		{
 			Attribute attr = as[i];
 			result.append(attr.toString());
-			if (i + 1 < as.length)
-				result.append(",");
+			if (i + 1 < as.length) {
+                result.append(",");
+            }
 		}
 		result.append("]");
 		return result.toString();
@@ -138,8 +143,9 @@ public abstract class AbstractTestCase e
 		{
 			AnnotationEntry annotation = as[i];
 			result.append(annotation.toShortString());
-			if (i + 1 < as.length)
-				result.append(",");
+			if (i + 1 < as.length) {
+                result.append(",");
+            }
 		}
 		result.append("]");
 		return result.toString();
@@ -153,8 +159,9 @@ public abstract class AbstractTestCase e
 		{
 			AnnotationEntryGen annotation = as[i];
 			result.append(annotation.toShortString());
-			if (i + 1 < as.length)
-				result.append(",");
+			if (i + 1 < as.length) {
+                result.append(",");
+            }
 		}
 		result.append("]");
 		return result.toString();

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/FieldAnnotationsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/FieldAnnotationsTestCase.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/FieldAnnotationsTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/FieldAnnotationsTestCase.java Tue Dec 31 22:06:09 2013
@@ -72,35 +72,43 @@ public class FieldAnnotationsTestCase ex
 		JavaClass clazz = getTestClass("org.apache.bcel.data.AnnotatedFields");
 		ClassGen clg = new ClassGen(clazz);
 		Field f = clg.getFields()[0];
-		if (dbg)
-			System.err.println("Field in freshly constructed class is: " + f);
-		if (dbg)
-			System.err.println("AnnotationEntrys on field are: "
+		if (dbg) {
+            System.err.println("Field in freshly constructed class is: " + f);
+        }
+		if (dbg) {
+            System.err.println("AnnotationEntrys on field are: "
 					+ dumpAnnotationEntries(f.getAnnotationEntries()));
+        }
 		AnnotationEntryGen fruitBasedAnnotationEntry = createFruitAnnotationEntry(clg
 				.getConstantPool(), "Tomato", false);
 		FieldGen fg = new FieldGen(f, clg.getConstantPool());
-		if (dbg)
-			System.err.println("Adding AnnotationEntry to the field");
+		if (dbg) {
+            System.err.println("Adding AnnotationEntry to the field");
+        }
 		fg.addAnnotationEntry(fruitBasedAnnotationEntry);
-		if (dbg)
-			System.err.println("FieldGen (mutable field) is " + fg);
-		if (dbg)
-			System.err.println("with AnnotationEntrys: "
+		if (dbg) {
+            System.err.println("FieldGen (mutable field) is " + fg);
+        }
+		if (dbg) {
+            System.err.println("with AnnotationEntrys: "
 					+ dumpAnnotationEntries(fg.getAnnotationEntries()));
-		if (dbg)
-			System.err
+        }
+		if (dbg) {
+            System.err
 					.println("Replacing original field with new field that has extra AnnotationEntry");
+        }
 		clg.removeField(f);
 		clg.addField(fg.getField());
 		f = clg.getFields()[1]; // there are two fields in the class, removing
 								// and readding has changed the order
 		// so this time index [1] is the 'int i' field
-		if (dbg)
-			System.err.println("Field now looks like this: " + f);
-		if (dbg)
-			System.err.println("With AnnotationEntrys: "
+		if (dbg) {
+            System.err.println("Field now looks like this: " + f);
+        }
+		if (dbg) {
+            System.err.println("With AnnotationEntrys: "
 					+ dumpAnnotationEntries(f.getAnnotationEntries()));
+        }
 		assertTrue("Should be 2 AnnotationEntrys on this field, but there are "
 				+ f.getAnnotationEntries().length, f.getAnnotationEntries().length == 2);
 	}

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/GeneratingAnnotatedClassesTestCase.java Tue Dec 31 22:06:09 2013
@@ -367,8 +367,9 @@ public class GeneratingAnnotatedClassesT
             if (element.getNameString().equals("dval"))
             {
                 if (((SimpleElementValueGen) element.getValue())
-                        .stringifyValue().equals("33.4"))
+                        .stringifyValue().equals("33.4")) {
                     found = true;
+                }
             }
         }
         assertTrue("Did not find double annotation value with value 33.4",

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/InstructionFinderTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/InstructionFinderTestCase.java?rev=1554577&r1=1554576&r2=1554577&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/InstructionFinderTestCase.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/InstructionFinderTestCase.java Tue Dec 31 22:06:09 2013
@@ -42,8 +42,9 @@ public class InstructionFinderTestCase e
 			}
 		}
 		
-		if (searchM == null)
-			throw new Exception("search method not found");
+		if (searchM == null) {
+            throw new Exception("search method not found");
+        }
 		
 		byte[] bytes = searchM.getCode().getCode();
 		InstructionList il = new InstructionList(bytes);



Mime
View raw message