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 2016/06/21 20:43:39 UTC

svn commit: r1749600 [6/6] - in /commons/proper/bcel/trunk/src: main/java/org/apache/bcel/generic/ main/java/org/apache/bcel/util/ main/java/org/apache/bcel/verifier/exc/ main/java/org/apache/bcel/verifier/statics/ main/java/org/apache/bcel/verifier/st...

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/LocalVariables.java Tue Jun 21 20:43:38 2016
@@ -36,9 +36,9 @@ public class LocalVariables implements C
     /**
      * Creates a new LocalVariables object.
      */
-    public LocalVariables(final int maxLocals){
+    public LocalVariables(final int maxLocals) {
         locals = new Type[maxLocals];
-        for (int i=0; i<maxLocals; i++){
+        for (int i=0; i<maxLocals; i++) {
             locals[i] = Type.UNKNOWN;
         }
     }
@@ -49,9 +49,9 @@ public class LocalVariables implements C
      * However, the Type objects in the array are shared.
      */
     @Override
-    public Object clone(){
+    public Object clone() {
         LocalVariables lvs = new LocalVariables(locals.length);
-        for (int i=0; i<locals.length; i++){
+        for (int i=0; i<locals.length; i++) {
             lvs.locals[i] = this.locals[i];
         }
         return lvs;
@@ -60,7 +60,7 @@ public class LocalVariables implements C
     /**
      * Returns the type of the local variable slot i.
      */
-    public Type get(final int i){
+    public Type get(final int i) {
         return locals[i];
     }
 
@@ -68,7 +68,7 @@ public class LocalVariables implements C
      * Returns a (correctly typed) clone of this object.
      * This is equivalent to ((LocalVariables) this.clone()).
      */
-    public LocalVariables getClone(){
+    public LocalVariables getClone() {
         return (LocalVariables) this.clone();
     }
 
@@ -76,15 +76,15 @@ public class LocalVariables implements C
      * Returns the number of local variable slots this
      * LocalVariables instance has.
      */
-    public int maxLocals(){
+    public int maxLocals() {
         return locals.length;
     }
 
     /**
      * Sets a new Type for the given local variable slot.
      */
-    public void set(final int i, final Type type){ // TODO could be package-protected?
-        if (type == Type.BYTE || type == Type.SHORT || type == Type.BOOLEAN || type == Type.CHAR){
+    public void set(final int i, final Type type) { // TODO could be package-protected?
+        if (type == Type.BYTE || type == Type.SHORT || type == Type.BOOLEAN || type == Type.CHAR) {
             throw new AssertionViolatedException("LocalVariables do not know about '"+type+"'. Use Type.INT instead.");
         }
         locals[i] = type;
@@ -99,7 +99,7 @@ public class LocalVariables implements C
      * Fulfills the general contract of Object.equals().
      */
     @Override
-    public boolean equals(final Object o){
+    public boolean equals(final Object o) {
         if (!(o instanceof LocalVariables)) {
             return false;
         }
@@ -107,8 +107,8 @@ public class LocalVariables implements C
         if (this.locals.length != lv.locals.length) {
             return false;
         }
-        for (int i=0; i<this.locals.length; i++){
-            if (!this.locals[i].equals(lv.locals[i])){
+        for (int i=0; i<this.locals.length; i++) {
+            if (!this.locals[i].equals(lv.locals[i])) {
                 //System.out.println(this.locals[i]+" is not "+lv.locals[i]);
                 return false;
             }
@@ -120,13 +120,13 @@ public class LocalVariables implements C
      * Merges two local variables sets as described in the Java Virtual Machine Specification,
      * Second Edition, section 4.9.2, page 146.
      */
-    public void merge(final LocalVariables lv){
+    public void merge(final LocalVariables lv) {
 
-        if (this.locals.length != lv.locals.length){
+        if (this.locals.length != lv.locals.length) {
             throw new AssertionViolatedException("Merging LocalVariables of different size?!? From different methods or what?!?");
         }
 
-        for (int i=0; i<locals.length; i++){
+        for (int i=0; i<locals.length; i++) {
             merge(lv, i);
         }
     }
@@ -136,32 +136,32 @@ public class LocalVariables implements C
      *
      * @see #merge(LocalVariables)
      */
-    private void merge(final LocalVariables lv, final int i){
+    private void merge(final LocalVariables lv, final int i) {
         try {
 
         // We won't accept an unitialized object if we know it was initialized;
         // compare vmspec2, 4.9.4, last paragraph.
-        if ( (!(locals[i] instanceof UninitializedObjectType)) && (lv.locals[i] instanceof UninitializedObjectType) ){
+        if ( (!(locals[i] instanceof UninitializedObjectType)) && (lv.locals[i] instanceof UninitializedObjectType) ) {
             throw new StructuralCodeConstraintException(
                 "Backwards branch with an uninitialized object in the local variables detected.");
         }
         // Even harder, what about _different_ uninitialized object types?!
         if ( (!(locals[i].equals(lv.locals[i]))) && (locals[i] instanceof UninitializedObjectType) &&
-                (lv.locals[i] instanceof UninitializedObjectType) ){
+                (lv.locals[i] instanceof UninitializedObjectType) ) {
             throw new StructuralCodeConstraintException(
                 "Backwards branch with an uninitialized object in the local variables detected.");
         }
         // If we just didn't know that it was initialized, we have now learned.
-        if (locals[i] instanceof UninitializedObjectType){
-            if (! (lv.locals[i] instanceof UninitializedObjectType)){
+        if (locals[i] instanceof UninitializedObjectType) {
+            if (! (lv.locals[i] instanceof UninitializedObjectType)) {
                 locals[i] = ((UninitializedObjectType) locals[i]).getInitialized();
             }
         }
-        if ((locals[i] instanceof ReferenceType) && (lv.locals[i] instanceof ReferenceType)){
-            if (! locals[i].equals(lv.locals[i])){ // needed in case of two UninitializedObjectType instances
+        if ((locals[i] instanceof ReferenceType) && (lv.locals[i] instanceof ReferenceType)) {
+            if (! locals[i].equals(lv.locals[i])) { // needed in case of two UninitializedObjectType instances
                 Type sup = ((ReferenceType) locals[i]).getFirstCommonSuperclass((ReferenceType) (lv.locals[i]));
 
-                if (sup != null){
+                if (sup != null) {
                     locals[i] = sup;
                 }
                 else{
@@ -172,10 +172,10 @@ public class LocalVariables implements C
             }
         }
         else{
-            if (! (locals[i].equals(lv.locals[i])) ){
+            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)){
+                    (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]+"'.");
                 }
@@ -193,9 +193,9 @@ public class LocalVariables implements C
      * Returns a String representation of this object.
      */
     @Override
-    public String toString(){
+    public String toString() {
         StringBuilder sb = new StringBuilder();
-        for (int i=0; i<locals.length; i++){
+        for (int i=0; i<locals.length; i++) {
             sb.append(Integer.toString(i));
             sb.append(": ");
             sb.append(locals[i]);
@@ -208,9 +208,9 @@ public class LocalVariables implements C
      * Replaces all occurences of u in this local variables set
      * with an "initialized" ObjectType.
      */
-    public void initializeObject(final UninitializedObjectType u){
-        for (int i=0; i<locals.length; i++){
-            if (locals[i] == u){
+    public void initializeObject(final UninitializedObjectType u) {
+        for (int i=0; i<locals.length; i++) {
+            if (locals[i] == u) {
                 locals[i] = u.getInitialized();
             }
         }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/OperandStack.java Tue Jun 21 20:43:38 2016
@@ -44,7 +44,7 @@ public class OperandStack implements Clo
     /**
      * Creates an empty stack with a maximum of maxStack slots.
      */
-    public OperandStack(final int maxStack){
+    public OperandStack(final int maxStack) {
         this.maxStack = maxStack;
     }
 
@@ -52,7 +52,7 @@ public class OperandStack implements Clo
      * Creates an otherwise empty stack with a maximum of maxStack slots and
      * the ObjectType 'obj' at the top.
      */
-    public OperandStack(final int maxStack, final ObjectType obj){
+    public OperandStack(final int maxStack, final ObjectType obj) {
         this.maxStack = maxStack;
         this.push(obj);
     }    
@@ -62,7 +62,7 @@ public class OperandStack implements Clo
      * shared.
      */
     @Override
-    public Object clone(){
+    public Object clone() {
         OperandStack newstack = new OperandStack(this.maxStack);
         @SuppressWarnings("unchecked") // OK because this.stack is the same type
         final ArrayList<Type> clone = (ArrayList<Type>) this.stack.clone();
@@ -73,7 +73,7 @@ public class OperandStack implements Clo
     /**
      * Clears the stack.
      */
-    public void clear(){
+    public void clear() {
         stack = new ArrayList<>();
     }
 
@@ -88,7 +88,7 @@ public class OperandStack implements Clo
      * objects on the stacks.
      */
     @Override
-    public boolean equals(final Object o){
+    public boolean equals(final Object o) {
         if (!(o instanceof OperandStack)) {
             return false;
         }
@@ -101,28 +101,28 @@ public class OperandStack implements Clo
      *
      * @see #clone()
      */
-    public OperandStack getClone(){
+    public OperandStack getClone() {
         return (OperandStack) this.clone();
     }
 
     /**
      * Returns true IFF this OperandStack is empty.
    */
-    public boolean isEmpty(){
+    public boolean isEmpty() {
         return stack.isEmpty();
     }
 
     /**
      * Returns the number of stack slots this stack can hold.
      */
-    public int maxStack(){
+    public int maxStack() {
         return this.maxStack;
     }
 
     /**
      * Returns the element on top of the stack. The element is not popped off the stack!
      */
-    public Type peek(){
+    public Type peek() {
         return peek(0);
     }
 
@@ -130,14 +130,14 @@ public class OperandStack implements Clo
    * Returns the element that's i elements below the top element; that means,
    * iff i==0 the top element is returned. The element is not popped off the stack!
    */
-    public Type peek(final int i){
+    public Type peek(final int i) {
         return stack.get(size()-i-1);
     }
 
     /**
      * Returns the element on top of the stack. The element is popped off the stack.
      */
-    public Type pop(){
+    public Type pop() {
         Type e = stack.remove(size()-1);
         return e;
     }
@@ -145,8 +145,8 @@ public class OperandStack implements Clo
     /**
      * Pops i elements off the stack. ALWAYS RETURNS "null"!!!
      */
-    public Type pop(final int i){
-        for (int j=0; j<i; j++){
+    public Type pop(final int i) {
+        for (int j=0; j<i; j++) {
             pop();
         }
         return null;
@@ -155,14 +155,14 @@ public class OperandStack implements Clo
     /**
      * Pushes a Type object onto the stack.
      */
-    public void push(final Type type){
+    public void push(final Type type) {
         if (type == null) {
             throw new AssertionViolatedException("Cannot push NULL onto OperandStack.");
         }
-        if (type == Type.BOOLEAN || type == Type.CHAR || type == Type.BYTE || type == Type.SHORT){
+        if (type == Type.BOOLEAN || type == Type.CHAR || type == Type.BYTE || type == Type.SHORT) {
             throw new AssertionViolatedException("The OperandStack does not know about '"+type+"'; use Type.INT instead.");
         }
-        if (slotsUsed() >= maxStack){
+        if (slotsUsed() >= maxStack) {
             throw new AssertionViolatedException(
                 "OperandStack too small, should have thrown proper Exception elsewhere. Stack: "+this);
         }
@@ -172,7 +172,7 @@ public class OperandStack implements Clo
     /**
      * Returns the size of this OperandStack; that means, how many Type objects there are.
      */
-    public int size(){
+    public int size() {
         return stack.size();
     }
 
@@ -180,13 +180,13 @@ public class OperandStack implements Clo
      * Returns the number of stack slots used.
      * @see #maxStack()
      */    
-    public int slotsUsed(){
+    public int slotsUsed() {
         /*  XXX change this to a better implementation using a variable
             that keeps track of the actual slotsUsed()-value monitoring
             all push()es and pop()s.
         */
         int slots = 0;
-        for (int i=0; i<stack.size(); i++){
+        for (int i=0; i<stack.size(); i++) {
             slots += peek(i).getSize();
         }
         return slots;
@@ -196,14 +196,14 @@ public class OperandStack implements Clo
      * Returns a String representation of this OperandStack instance.
      */
     @Override
-    public String toString(){
+    public String toString() {
         StringBuilder sb = new StringBuilder();
         sb.append("Slots used: ");
         sb.append(slotsUsed());
         sb.append(" MaxStack: ");
         sb.append(maxStack);
         sb.append(".\n");
-        for (int i=0; i<size(); i++){
+        for (int i=0; i<size(); i++) {
             sb.append(peek(i));
             sb.append(" (Size: ");
             sb.append(String.valueOf(peek(i).getSize()));
@@ -217,34 +217,34 @@ public class OperandStack implements Clo
      * See the Java Virtual Machine Specification, Second Edition, page 146: 4.9.2
      * for details.
      */
-    public void merge(final OperandStack s){
+    public void merge(final OperandStack s) {
         try {
         if ( (slotsUsed() != s.slotsUsed()) || (size() != s.size()) ) {
             throw new StructuralCodeConstraintException(
                 "Cannot merge stacks of different size:\nOperandStack A:\n"+this+"\nOperandStack B:\n"+s);
         }
 
-        for (int i=0; i<size(); i++){
+        for (int i=0; i<size(); i++) {
             // If the object _was_ initialized and we're supposed to merge
             // in some uninitialized object, we reject the code (see vmspec2, 4.9.4, last paragraph).
-            if ( (! (stack.get(i) instanceof UninitializedObjectType)) && (s.stack.get(i) instanceof UninitializedObjectType) ){
+            if ( (! (stack.get(i) instanceof UninitializedObjectType)) && (s.stack.get(i) instanceof UninitializedObjectType) ) {
                 throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object on the stack detected.");
             }
             // Even harder, we're not initialized but are supposed to broaden
             // the known object type
             if ( (!(stack.get(i).equals(s.stack.get(i)))) &&
-                    (stack.get(i) instanceof UninitializedObjectType) && (!(s.stack.get(i) instanceof UninitializedObjectType))){
+                    (stack.get(i) instanceof UninitializedObjectType) && (!(s.stack.get(i) instanceof UninitializedObjectType))) {
                 throw new StructuralCodeConstraintException("Backwards branch with an uninitialized object on the stack detected.");
             }
             // on the other hand...
-            if (stack.get(i) instanceof UninitializedObjectType){ //if we have an uninitialized object here
-                if (! (s.stack.get(i) instanceof UninitializedObjectType)){ //that has been initialized by now
+            if (stack.get(i) instanceof UninitializedObjectType) { //if we have an uninitialized object here
+                if (! (s.stack.get(i) instanceof UninitializedObjectType)) { //that has been initialized by now
                     stack.set(i, ((UninitializedObjectType) (stack.get(i))).getInitialized() ); //note that.
                 }
             }
-            if (! stack.get(i).equals(s.stack.get(i))){
+            if (! stack.get(i).equals(s.stack.get(i))) {
                 if (    (stack.get(i) instanceof ReferenceType) &&
-                            (s.stack.get(i) instanceof ReferenceType)  ){
+                            (s.stack.get(i) instanceof ReferenceType)  ) {
                     stack.set(i, ((ReferenceType) stack.get(i)).getFirstCommonSuperclass((ReferenceType) (s.stack.get(i))));
                 }
                 else{
@@ -263,9 +263,9 @@ public class OperandStack implements Clo
      * Replaces all occurences of u in this OperandStack instance
      * with an "initialized" ObjectType.
      */
-    public void initializeObject(final UninitializedObjectType u){
-        for (int i=0; i<stack.size(); i++){
-            if (stack.get(i) == u){
+    public void initializeObject(final UninitializedObjectType u) {
+        for (int i=0; i<stack.size(); i++) {
+            if (stack.get(i) == u) {
                 stack.set(i, u.getInitialized());
             }
         }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Pass3bVerifier.java Tue Jun 21 20:43:38 2016
@@ -78,24 +78,24 @@ public final class Pass3bVerifier extend
     private static final class InstructionContextQueue{
         private final List<InstructionContext> ics = new Vector<>();
         private final List<ArrayList<InstructionContext>> ecs = new Vector<>();
-        public void add(final InstructionContext ic, final ArrayList<InstructionContext> executionChain){
+        public void add(final InstructionContext ic, final ArrayList<InstructionContext> executionChain) {
             ics.add(ic);
             ecs.add(executionChain);
         }
-        public boolean isEmpty(){
+        public boolean isEmpty() {
             return ics.isEmpty();
         }
-        public void remove(final int i){
+        public void remove(final int i) {
             ics.remove(i);
             ecs.remove(i);
         }
-        public InstructionContext getIC(final int i){
+        public InstructionContext getIC(final int i) {
             return ics.get(i);
         }
-        public ArrayList<InstructionContext> getEC(final int i){
+        public ArrayList<InstructionContext> getEC(final int i) {
             return ecs.get(i);
         }
-        public int size(){
+        public int size() {
             return ics.size();
         }
     } // end Inner Class InstructionContextQueue
@@ -114,7 +114,7 @@ public final class Pass3bVerifier extend
      *
      * @see org.apache.bcel.verifier.Verifier
      */
-    public Pass3bVerifier(final Verifier owner, final int method_no){
+    public Pass3bVerifier(final Verifier owner, final int method_no) {
         myOwner = owner;
         this.method_no = method_no;
     }
@@ -127,7 +127,7 @@ public final class Pass3bVerifier extend
    * fix point of frame merging.
      */
     private void circulationPump(final MethodGen m,final ControlFlowGraph cfg, final InstructionContext start,
-            final Frame vanillaFrame, final InstConstraintVisitor icv, final ExecutionVisitor ev){
+            final Frame vanillaFrame, final InstConstraintVisitor icv, final ExecutionVisitor ev) {
         final Random random = new Random();
         InstructionContextQueue icq = new InstructionContextQueue();
 
@@ -137,10 +137,10 @@ public final class Pass3bVerifier extend
         icq.add(start, new ArrayList<InstructionContext>());
 
         // LOOP!
-        while (!icq.isEmpty()){
+        while (!icq.isEmpty()) {
             InstructionContext u;
             ArrayList<InstructionContext> ec;
-            if (!DEBUG){
+            if (!DEBUG) {
                 int r = random.nextInt(icq.size());
                 u = icq.getIC(r);
                 ec = icq.getEC(r);
@@ -158,7 +158,7 @@ public final class Pass3bVerifier extend
             ArrayList<InstructionContext> newchain = (ArrayList<InstructionContext>) (ec.clone());
             newchain.add(u);
 
-            if ((u.getInstruction().getInstruction()) instanceof RET){
+            if ((u.getInstruction().getInstruction()) instanceof RET) {
 //System.err.println(u);
                 // We can only follow _one_ successor, the one after the
                 // JSR that was recently executed.
@@ -169,32 +169,32 @@ public final class Pass3bVerifier extend
                 // Sanity check
                 InstructionContext lastJSR = null;
                 int skip_jsr = 0;
-                for (int ss=oldchain.size()-1; ss >= 0; ss--){
-                    if (skip_jsr < 0){
+                for (int ss=oldchain.size()-1; ss >= 0; ss--) {
+                    if (skip_jsr < 0) {
                         throw new AssertionViolatedException("More RET than JSR in execution chain?!");
                     }
 //System.err.println("+"+oldchain.get(ss));
-                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof JsrInstruction){
-                        if (skip_jsr == 0){
+                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof JsrInstruction) {
+                        if (skip_jsr == 0) {
                             lastJSR = oldchain.get(ss);
                             break;
                         }
                         skip_jsr--;
                     }
-                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof RET){
+                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof RET) {
                         skip_jsr++;
                     }
                 }
-                if (lastJSR == null){
+                if (lastJSR == null) {
                     throw new AssertionViolatedException("RET without a JSR before in ExecutionChain?! EC: '"+oldchain+"'.");
                 }
                 JsrInstruction jsr = (JsrInstruction) (lastJSR.getInstruction().getInstruction());
-                if ( theSuccessor != (cfg.contextOf(jsr.physicalSuccessor())) ){
+                if ( theSuccessor != (cfg.contextOf(jsr.physicalSuccessor())) ) {
                     throw new AssertionViolatedException("RET '"+u.getInstruction()+"' info inconsistent: jump back to '"+
                         theSuccessor+"' or '"+cfg.contextOf(jsr.physicalSuccessor())+"'?");
                 }
 
-                if (theSuccessor.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
+                if (theSuccessor.execute(u.getOutFrame(oldchain), newchain, icv, ev)) {
                     @SuppressWarnings("unchecked") // newchain is already of type ArrayList<InstructionContext>
                     ArrayList<InstructionContext> newchainClone = (ArrayList<InstructionContext>) newchain.clone();
                     icq.add(theSuccessor, newchainClone);
@@ -205,7 +205,7 @@ public final class Pass3bVerifier extend
                 // Normal successors. Add them to the queue of successors.
                 InstructionContext[] succs = u.getSuccessors();
                 for (InstructionContext v : succs) {
-                    if (v.execute(u.getOutFrame(oldchain), newchain, icv, ev)){
+                    if (v.execute(u.getOutFrame(oldchain), newchain, icv, ev)) {
                         @SuppressWarnings("unchecked") // newchain is already of type ArrayList<InstructionContext>
                         ArrayList<InstructionContext> newchainClone = (ArrayList<InstructionContext>) newchain.clone();
                         icq.add(v, newchainClone);
@@ -228,12 +228,12 @@ public final class Pass3bVerifier extend
                 // by using an empty chain for the exception handlers.
                 //if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(),
                 // new OperandStack (u.getOutFrame().getStack().maxStack(),
-                // (exc_hds[s].getExceptionType()==null? Type.THROWABLE : exc_hds[s].getExceptionType())) ), newchain), icv, ev){
+                // (exc_hds[s].getExceptionType()==null? Type.THROWABLE : exc_hds[s].getExceptionType())) ), newchain), icv, ev) {
                     //icq.add(v, (ArrayList) newchain.clone());
                 if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(),
                         new OperandStack (u.getOutFrame(oldchain).getStack().maxStack(),
                         exc_hd.getExceptionType()==null? Type.THROWABLE : exc_hd.getExceptionType())),
-                        new ArrayList<InstructionContext>(), icv, ev)){
+                        new ArrayList<InstructionContext>(), icv, ev)) {
                     icq.add(v, new ArrayList<InstructionContext>());
                 }
             }
@@ -248,15 +248,15 @@ public final class Pass3bVerifier extend
                 // Maybe some maniac returns from a method when in a subroutine?
                 Frame f = ic.getOutFrame(new ArrayList<InstructionContext>());
                 LocalVariables lvs = f.getLocals();
-                for (int i=0; i<lvs.maxLocals(); i++){
-                    if (lvs.get(i) instanceof UninitializedObjectType){
+                for (int i=0; i<lvs.maxLocals(); i++) {
+                    if (lvs.get(i) instanceof UninitializedObjectType) {
                         this.addMessage("Warning: ReturnInstruction '"+ic+
                             "' may leave method with an uninitialized object in the local variables array '"+lvs+"'.");
                     }
                 }
                 OperandStack os = f.getStack();
-                for (int i=0; i<os.size(); i++){
-                    if (os.peek(i) instanceof UninitializedObjectType){
+                for (int i=0; i<os.size(); i++) {
+                    if (os.peek(i) instanceof UninitializedObjectType) {
                         this.addMessage("Warning: ReturnInstruction '"+ic+
                             "' may leave method with an uninitialized object on the operand stack '"+os+"'.");
                     }
@@ -294,7 +294,7 @@ public final class Pass3bVerifier extend
      * @throws StructuralCodeConstraintException always
      * @since 6.0
      */
-    public void invalidReturnTypeError(final Type returnedType, final MethodGen m){
+    public void invalidReturnTypeError(final Type returnedType, final MethodGen m) {
         throw new StructuralCodeConstraintException(
             "Returned type "+returnedType+" does not match Method's return type "+m.getReturnType());
     }
@@ -310,8 +310,8 @@ public final class Pass3bVerifier extend
       * @see org.apache.bcel.verifier.statics.Pass2Verifier#getLocalVariablesInfo(int)
       */
     @Override
-    public VerificationResult do_verify(){
-        if (! myOwner.doPass3a(method_no).equals(VerificationResult.VR_OK)){
+    public VerificationResult do_verify() {
+        if (! myOwner.doPass3a(method_no).equals(VerificationResult.VR_OK)) {
             return VerificationResult.VR_NOTYET;
         }
 
@@ -342,14 +342,14 @@ public final class Pass3bVerifier extend
             icv.setMethodGen(mg);
 
             ////////////// DFA BEGINS HERE ////////////////
-            if (! (mg.isAbstract() || mg.isNative()) ){ // IF mg HAS CODE (See pass 2)
+            if (! (mg.isAbstract() || mg.isNative()) ) { // IF mg HAS CODE (See pass 2)
 
                 ControlFlowGraph cfg = new ControlFlowGraph(mg);
 
                 // Build the initial frame situation for this method.
                 Frame f = new Frame(mg.getMaxLocals(),mg.getMaxStack());
-                if ( !mg.isStatic() ){
-                    if (mg.getName().equals(Const.CONSTRUCTOR_NAME)){
+                if ( !mg.isStatic() ) {
+                    if (mg.getName().equals(Const.CONSTRUCTOR_NAME)) {
                         Frame.setThis(new UninitializedObjectType(ObjectType.getInstance(jc.getClassName())));
                         f.getLocals().set(0, Frame.getThis());
                     }
@@ -360,13 +360,13 @@ public final class Pass3bVerifier extend
                 }
                 Type[] argtypes = mg.getArgumentTypes();
                 int twoslotoffset = 0;
-                for (int j=0; j<argtypes.length; j++){
+                for (int j=0; j<argtypes.length; j++) {
                     if (argtypes[j] == Type.SHORT || argtypes[j] == Type.BYTE ||
-                        argtypes[j] == Type.CHAR || argtypes[j] == Type.BOOLEAN){
+                        argtypes[j] == Type.CHAR || argtypes[j] == Type.BOOLEAN) {
                         argtypes[j] = Type.INT;
                     }
                     f.getLocals().set(twoslotoffset + j + (mg.isStatic()?0:1), argtypes[j]);
-                    if (argtypes[j].getSize() == 2){
+                    if (argtypes[j].getSize() == 2) {
                         twoslotoffset++;
                         f.getLocals().set(twoslotoffset + j + (mg.isStatic()?0:1), Type.UNKNOWN);
                     }
@@ -374,11 +374,11 @@ public final class Pass3bVerifier extend
                 circulationPump(mg,cfg, cfg.contextOf(mg.getInstructionList().getStart()), f, icv, ev);
             }
         }
-        catch (VerifierConstraintViolatedException ce){
+        catch (VerifierConstraintViolatedException ce) {
             ce.extendMessage("Constraint violated in method '"+methods[method_no]+"':\n","");
             return new VerificationResult(VerificationResult.VERIFIED_REJECTED, ce.getMessage());
         }
-        catch (RuntimeException re){
+        catch (RuntimeException re) {
             // These are internal errors
 
             StringWriter sw = new StringWriter();
@@ -392,7 +392,7 @@ public final class Pass3bVerifier extend
     }
 
     /** Returns the method number as supplied when instantiating. */
-    public int getMethodNo(){
+    public int getMethodNo() {
         return method_no;
     }
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/Subroutines.java Tue Jun 21 20:43:38 2016
@@ -91,7 +91,7 @@ public class Subroutines{
          * Refer to the Subroutine interface for documentation.
          */
         @Override
-        public boolean contains(final InstructionHandle inst){
+        public boolean contains(final InstructionHandle inst) {
             return instructions.contains(inst);
         }
 
@@ -114,7 +114,7 @@ public class Subroutines{
          * Don't use this, then.
          */
         @Override
-        public String toString(){
+        public String toString() {
             StringBuilder ret = new StringBuilder();
             ret.append("Subroutine: Local variable is '").append(localVariable);
             ret.append("', JSRs are '").append(theJSRs);
@@ -142,25 +142,25 @@ public class Subroutines{
          * Sets the leaving RET instruction. Must be invoked after all instructions are added.
          * Must not be invoked for top-level 'subroutine'.
          */
-        void setLeavingRET(){
-            if (localVariable == UNSET){
+        void setLeavingRET() {
+            if (localVariable == UNSET) {
                 throw new AssertionViolatedException(
                     "setLeavingRET() called for top-level 'subroutine' or forgot to set local variable first.");
             }
             InstructionHandle ret = null;
             for (InstructionHandle actual : instructions) {
-                if (actual.getInstruction() instanceof RET){
-                    if (ret != null){
+                if (actual.getInstruction() instanceof RET) {
+                    if (ret != null) {
                         throw new StructuralCodeConstraintException(
                             "Subroutine with more then one RET detected: '"+ret+"' and '"+actual+"'.");
                     }
                     ret = actual;
                 }
             }
-            if (ret == null){
+            if (ret == null) {
                 throw new StructuralCodeConstraintException("Subroutine without a RET detected.");
             }
-            if (((RET) ret.getInstruction()).getIndex() != localVariable){
+            if (((RET) ret.getInstruction()).getIndex() != localVariable) {
                 throw new StructuralCodeConstraintException(
                     "Subroutine uses '"+ret+"' which does not match the correct local variable '"+localVariable+"'.");
             }
@@ -171,7 +171,7 @@ public class Subroutines{
          * Refer to the Subroutine interface for documentation.
          */
         @Override
-        public InstructionHandle[] getEnteringJsrInstructions(){
+        public InstructionHandle[] getEnteringJsrInstructions() {
             if (this == getTopLevel()) {
                 throw new AssertionViolatedException("getLeavingRET() called on top level pseudo-subroutine.");
             }
@@ -182,17 +182,17 @@ public class Subroutines{
         /**
          * Adds a new JSR or JSR_W that has this subroutine as its target.
          */
-        public void addEnteringJsrInstruction(final InstructionHandle jsrInst){
-            if ( (jsrInst == null) || (! (jsrInst.getInstruction() instanceof JsrInstruction))){
+        public void addEnteringJsrInstruction(final InstructionHandle jsrInst) {
+            if ( (jsrInst == null) || (! (jsrInst.getInstruction() instanceof JsrInstruction))) {
                 throw new AssertionViolatedException("Expecting JsrInstruction InstructionHandle.");
             }
-            if (localVariable == UNSET){
+            if (localVariable == UNSET) {
                 throw new AssertionViolatedException("Set the localVariable first!");
             }
             // Something is wrong when an ASTORE is targeted that does not operate on the same local variable than the rest of the
             // JsrInstruction-targets and the RET.
             // (We don't know out leader here so we cannot check if we're really targeted!)
-            if (localVariable != ((ASTORE) (((JsrInstruction) jsrInst.getInstruction()).getTarget().getInstruction())).getIndex()){
+            if (localVariable != ((ASTORE) (((JsrInstruction) jsrInst.getInstruction()).getTarget().getInstruction())).getIndex()) {
                 throw new AssertionViolatedException("Setting a wrong JsrInstruction.");
             }
             theJSRs.add(jsrInst);
@@ -202,7 +202,7 @@ public class Subroutines{
          * Refer to the Subroutine interface for documentation.
          */
         @Override
-        public InstructionHandle getLeavingRET(){
+        public InstructionHandle getLeavingRET() {
             if (this == getTopLevel()) {
                 throw new AssertionViolatedException("getLeavingRET() called on top level pseudo-subroutine.");
             }
@@ -213,7 +213,7 @@ public class Subroutines{
          * Refer to the Subroutine interface for documentation.
          */
         @Override
-        public InstructionHandle[] getInstructions(){
+        public InstructionHandle[] getInstructions() {
             InstructionHandle[] ret = new InstructionHandle[instructions.size()];
             return instructions.toArray(ret);
         }
@@ -223,8 +223,8 @@ public class Subroutines{
          * All instructions must have been added before invoking setLeavingRET().
          * @see #setLeavingRET
          */
-        void addInstruction(final InstructionHandle ih){
-            if (theRET != null){
+        void addInstruction(final InstructionHandle ih) {
+            if (theRET != null) {
                 throw new AssertionViolatedException("All instructions must have been added before invoking setLeavingRET().");
             }
             instructions.add(ih);
@@ -232,7 +232,7 @@ public class Subroutines{
 
         /* Satisfies Subroutine.getRecursivelyAccessedLocalsIndices(). */
         @Override
-        public int[] getRecursivelyAccessedLocalsIndices(){
+        public int[] getRecursivelyAccessedLocalsIndices() {
             Set<Integer> s = new HashSet<>();
             int[] lvs = getAccessedLocalsIndices();
             for (int lv : lvs) {
@@ -252,13 +252,13 @@ public class Subroutines{
          * A recursive helper method for getRecursivelyAccessedLocalsIndices().
          * @see #getRecursivelyAccessedLocalsIndices()
          */
-        private void _getRecursivelyAccessedLocalsIndicesHelper(final Set<Integer> s, final Subroutine[] subs){
+        private void _getRecursivelyAccessedLocalsIndicesHelper(final Set<Integer> s, final Subroutine[] subs) {
             for (Subroutine sub : subs) {
                 int[] lvs = sub.getAccessedLocalsIndices();
                 for (int lv : lvs) {
                     s.add(Integer.valueOf(lv));
                 }
-                if(sub.subSubs().length != 0){
+                if(sub.subSubs().length != 0) {
                     _getRecursivelyAccessedLocalsIndicesHelper(s, sub.subSubs());
                 }
             }
@@ -268,31 +268,31 @@ public class Subroutines{
          * Satisfies Subroutine.getAccessedLocalIndices().
          */
         @Override
-        public int[] getAccessedLocalsIndices(){
+        public int[] getAccessedLocalsIndices() {
             //TODO: Implement caching.
             Set<Integer> acc = new HashSet<>();
-            if (theRET == null && this != getTopLevel()){
+            if (theRET == null && this != getTopLevel()) {
                 throw new AssertionViolatedException(
                     "This subroutine object must be built up completely before calculating accessed locals.");
             }
             {
                 for (InstructionHandle ih : instructions) {
                     // RET is not a LocalVariableInstruction in the current version of BCEL.
-                    if (ih.getInstruction() instanceof LocalVariableInstruction || ih.getInstruction() instanceof RET){
+                    if (ih.getInstruction() instanceof LocalVariableInstruction || ih.getInstruction() instanceof RET) {
                         int idx = ((IndexedInstruction) (ih.getInstruction())).getIndex();
                         acc.add(Integer.valueOf(idx));
                         // LONG? DOUBLE?.
                         try{
                             // LocalVariableInstruction instances are typed without the need to look into
                             // the constant pool.
-                            if (ih.getInstruction() instanceof LocalVariableInstruction){
+                            if (ih.getInstruction() instanceof LocalVariableInstruction) {
                                 int s = ((LocalVariableInstruction) ih.getInstruction()).getType(null).getSize();
                                 if (s==2) {
                                     acc.add(Integer.valueOf(idx+1));
                                 }
                             }
                         }
-                        catch(RuntimeException re){
+                        catch(RuntimeException re) {
                             throw new AssertionViolatedException("Oops. BCEL did not like NULL as a ConstantPoolGen object.", re);
                         }
                     }
@@ -314,12 +314,12 @@ public class Subroutines{
          * Satisfies Subroutine.subSubs().
          */
         @Override
-        public Subroutine[] subSubs(){
+        public Subroutine[] subSubs() {
             Set<Subroutine> h = new HashSet<>();
 
             for (InstructionHandle ih : instructions) {
                 Instruction inst = ih.getInstruction();
-                if (inst instanceof JsrInstruction){
+                if (inst instanceof JsrInstruction) {
                     InstructionHandle targ = ((JsrInstruction) inst).getTarget();
                     h.add(getSubroutine(targ));
                 }
@@ -334,8 +334,8 @@ public class Subroutines{
          * This subroutine's RET operates on that same local variable
          * slot, of course.
          */
-        void setLocalVariable(final int i){
-            if (localVariable != UNSET){
+        void setLocalVariable(final int i) {
+            if (localVariable != UNSET) {
                 throw new AssertionViolatedException("localVariable set twice.");
             }
             localVariable = i;
@@ -344,7 +344,7 @@ public class Subroutines{
         /**
          * The default constructor.
          */
-        public SubroutineImpl(){
+        public SubroutineImpl() {
         }
 
     }// end Inner Class SubrouteImpl
@@ -379,7 +379,7 @@ public class Subroutines{
      * create the Subroutine objects of.
      * Assumes that JustIce strict checks are needed.
      */
-    public Subroutines(final MethodGen mg){
+    public Subroutines(final MethodGen mg) {
         this(mg, true);
     }
 
@@ -390,7 +390,7 @@ public class Subroutines{
      * @param enableJustIceCheck whether to enable additional JustIce checks
      * @since 6.0
      */
-    public Subroutines(final MethodGen mg, final boolean enableJustIceCheck){
+    public Subroutines(final MethodGen mg, final boolean enableJustIceCheck) {
         InstructionHandle[] all = mg.getInstructionList().getInstructionHandles();
         CodeExceptionGen[] handlers = mg.getExceptionHandlers();
 
@@ -401,7 +401,7 @@ public class Subroutines{
         Set<InstructionHandle> sub_leaders = new HashSet<>(); // Elements: InstructionHandle
         for (InstructionHandle element : all) {
             Instruction inst = element.getInstruction();
-            if (inst instanceof JsrInstruction){
+            if (inst instanceof JsrInstruction) {
                 sub_leaders.add(((JsrInstruction) inst).getTarget());
             }
         }
@@ -424,7 +424,7 @@ public class Subroutines{
         // disallowed and checked below, after the BFS.
         for (InstructionHandle element : all) {
             Instruction inst = element.getInstruction();
-            if (inst instanceof JsrInstruction){
+            if (inst instanceof JsrInstruction) {
                 InstructionHandle leader = ((JsrInstruction) inst).getTarget();
                 ((SubroutineImpl) getSubroutine(leader)).addEnteringJsrInstruction(element);
             }
@@ -457,7 +457,7 @@ public class Subroutines{
              * [why top-level?
              * TODO: Refer to the special JustIce notion of subroutines.]
              */
-            if (actual == all[0]){
+            if (actual == all[0]) {
                 for (CodeExceptionGen handler : handlers) {
                     colors.put(handler.getHandlerPC(), ColourConstants.GRAY);
                     Q.add(handler.getHandlerPC());
@@ -466,11 +466,11 @@ public class Subroutines{
             /* CONTINUE NORMAL BFS ALGORITHM */
 
             // Loop until Queue is empty
-            while (Q.size() != 0){
+            while (Q.size() != 0) {
                 InstructionHandle u = Q.remove(0);
                 InstructionHandle[] successors = getSuccessors(u);
                 for (InstructionHandle successor : successors) {
-                    if (colors.get(successor) == ColourConstants.WHITE){
+                    if (colors.get(successor) == ColourConstants.WHITE) {
                         colors.put(successor, ColourConstants.GRAY);
                         Q.add(successor);
                     }
@@ -479,16 +479,16 @@ public class Subroutines{
             }
             // BFS ended above.
             for (InstructionHandle element : all) {
-                if (colors.get(element) == ColourConstants.BLACK){
+                if (colors.get(element) == ColourConstants.BLACK) {
                     ((SubroutineImpl) (actual==all[0]?getTopLevel():getSubroutine(actual))).addInstruction(element);
-                    if (instructions_assigned.contains(element)){
+                    if (instructions_assigned.contains(element)) {
                         throw new StructuralCodeConstraintException("Instruction '"+element+
                             "' is part of more than one subroutine (or of the top level and a subroutine).");
                     }
                     instructions_assigned.add(element);
                 }
             }
-            if (actual != all[0]){// If we don't deal with the top-level 'subroutine'
+            if (actual != all[0]) {// If we don't deal with the top-level 'subroutine'
                 ((SubroutineImpl) getSubroutine(actual)).setLeavingRET();
             }
         }
@@ -498,11 +498,11 @@ public class Subroutines{
             // as is mandated by JustIces notion of subroutines.
             for (CodeExceptionGen handler : handlers) {
                 InstructionHandle _protected = handler.getStartPC();
-                while (_protected != handler.getEndPC().getNext()){
+                while (_protected != handler.getEndPC().getNext()) {
                     // Note the inclusive/inclusive notation of "generic API" exception handlers!
                     for (Subroutine sub : subroutines.values()) {
-                        if (sub != subroutines.get(all[0])){    // We don't want to forbid top-level exception handlers.
-                            if (sub.contains(_protected)){
+                        if (sub != subroutines.get(all[0])) {    // We don't want to forbid top-level exception handlers.
+                            if (sub.contains(_protected)) {
                                 throw new StructuralCodeConstraintException("Subroutine instruction '"+_protected+
                                     "' is protected by an exception handler, '"+handler+
                                     "'. This is forbidden by the JustIce verifier due to its clear definition of subroutines.");
@@ -535,13 +535,13 @@ public class Subroutines{
      *
      * @throws StructuralCodeConstraintException if the above constraint is not satisfied.
      */
-    private void noRecursiveCalls(final Subroutine sub, final Set<Integer> set){
+    private void noRecursiveCalls(final Subroutine sub, final Set<Integer> set) {
         Subroutine[] subs = sub.subSubs();
 
         for (Subroutine sub2 : subs) {
             int index = ((RET) (sub2.getLeavingRET().getInstruction())).getIndex();
 
-            if (!set.add(Integer.valueOf(index))){
+            if (!set.add(Integer.valueOf(index))) {
                 // Don't use toString() here because of possibly infinite recursive subSubs() calls then.
                 SubroutineImpl si = (SubroutineImpl) sub2;
                 throw new StructuralCodeConstraintException("Subroutine with local variable '"+si.localVariable+"', JSRs '"+
@@ -564,15 +564,15 @@ public class Subroutines{
      *
      * @see #getTopLevel()
      */
-    public Subroutine getSubroutine(final InstructionHandle leader){
+    public Subroutine getSubroutine(final InstructionHandle leader) {
         Subroutine ret = subroutines.get(leader);
 
-        if (ret == null){
+        if (ret == null) {
             throw new AssertionViolatedException(
                 "Subroutine requested for an InstructionHandle that is not a leader of a subroutine.");
         }
 
-        if (ret == TOPLEVEL){
+        if (ret == TOPLEVEL) {
             throw new AssertionViolatedException("TOPLEVEL special subroutine requested; use getTopLevel().");
         }
 
@@ -590,7 +590,7 @@ public class Subroutines{
      * @see #getSubroutine(InstructionHandle)
      * @see #getTopLevel()
      */
-    public Subroutine subroutineOf(final InstructionHandle any){
+    public Subroutine subroutineOf(final InstructionHandle any) {
         for (Subroutine s : subroutines.values()) {
             if (s.contains(any)) {
                 return s;
@@ -611,7 +611,7 @@ System.err.println("DEBUG: Please verify
      * @see Subroutine#getEnteringJsrInstructions()
      * @see Subroutine#getLeavingRET()
      */
-    public Subroutine getTopLevel(){
+    public Subroutine getTopLevel() {
         return TOPLEVEL;
     }
     /**
@@ -620,40 +620,40 @@ System.err.println("DEBUG: Please verify
      * as defined here. A JsrInstruction has its physical successor as its successor
      * (opposed to its target) as defined here.
      */
-    private static InstructionHandle[] getSuccessors(final InstructionHandle instruction){
+    private static InstructionHandle[] getSuccessors(final InstructionHandle instruction) {
         final InstructionHandle[] empty = new InstructionHandle[0];
         final InstructionHandle[] single = new InstructionHandle[1];
 
         Instruction inst = instruction.getInstruction();
 
-        if (inst instanceof RET){
+        if (inst instanceof RET) {
             return empty;
         }
 
         // Terminates method normally.
-        if (inst instanceof ReturnInstruction){
+        if (inst instanceof ReturnInstruction) {
             return empty;
         }
 
         // Terminates method abnormally, because JustIce mandates
         // subroutines not to be protected by exception handlers.
-        if (inst instanceof ATHROW){
+        if (inst instanceof ATHROW) {
             return empty;
         }
 
         // See method comment.
-        if (inst instanceof JsrInstruction){
+        if (inst instanceof JsrInstruction) {
             single[0] = instruction.getNext();
             return single;
         }
 
-        if (inst instanceof GotoInstruction){
+        if (inst instanceof GotoInstruction) {
             single[0] = ((GotoInstruction) inst).getTarget();
             return single;
         }
 
-        if (inst instanceof BranchInstruction){
-            if (inst instanceof Select){
+        if (inst instanceof BranchInstruction) {
+            if (inst instanceof Select) {
                 // BCEL's getTargets() returns only the non-default targets,
                 // thanks to Eli Tilevich for reporting.
                 InstructionHandle[] matchTargets = ((Select) inst).getTargets();
@@ -677,7 +677,7 @@ System.err.println("DEBUG: Please verify
      * Returns a String representation of this object; merely for debugging puposes.
      */
     @Override
-    public String toString(){
+    public String toString() {
         return "---\n"+subroutines+"\n---\n";
     }
 }

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/verifier/structurals/UninitializedObjectType.java Tue Jun 21 20:43:38 2016
@@ -36,7 +36,7 @@ public class UninitializedObjectType ext
     private final ObjectType initialized;
 
     /** Creates a new instance. */
-    public UninitializedObjectType(final ObjectType t){
+    public UninitializedObjectType(final ObjectType t) {
         super(Const.T_UNKNOWN, "<UNINITIALIZED OBJECT OF TYPE '"+t.getClassName()+"'>");
         initialized = t;
     }
@@ -45,7 +45,7 @@ public class UninitializedObjectType ext
      * Returns the ObjectType of the same class as the one of the uninitialized object
      * represented by this UninitializedObjectType instance.
      */
-    public ObjectType getInitialized(){
+    public ObjectType getInitialized() {
         return initialized;
     }
 
@@ -61,7 +61,7 @@ public class UninitializedObjectType ext
      *
      */
     @Override
-    public boolean equals(final Object o){
+    public boolean equals(final Object o) {
         if (! (o instanceof UninitializedObjectType)) {
             return false;
         }

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=1749600&r1=1749599&r2=1749600&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 Jun 21 20:43:38 2016
@@ -99,7 +99,7 @@ public abstract class AbstractTestCase e
         String[] files = testDir.list();
         if (files == null || files.length == 0)
         {
-            if (!testDir.delete()){
+            if (!testDir.delete()) {
                 System.err.println("Failed to remove: " + testDir);
             }
         } else {

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestArray01.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestArray01.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestArray01.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestArray01.java Tue Jun 21 20:43:38 2016
@@ -21,7 +21,7 @@ import java.io.Serializable;
 
 public class TestArray01{
 
-    public static Object test1(){
+    public static Object test1() {
         String[] a = new String[4];
         a[0] = "";
         a.equals(null);
@@ -31,24 +31,24 @@ public class TestArray01{
         return a;
     }
 
-    public static void test2(final Object o){
+    public static void test2(final Object o) {
     }
 
-    public static void test3(final Serializable o){
+    public static void test3(final Serializable o) {
     }
 
-    public static void test4(final Cloneable o){
+    public static void test4(final Cloneable o) {
     }
 
-    public static Serializable test5(){
+    public static Serializable test5() {
         return new Object[1];
     }
 
-    public static Cloneable test6(){
+    public static Cloneable test6() {
         return new Object[1];
     }
 
-    public static Object foo(final String s){
+    public static Object foo(final String s) {
         return s;
     }
 }

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestArrayAccess01.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestArrayAccess01.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestArrayAccess01.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestArrayAccess01.java Tue Jun 21 20:43:38 2016
@@ -20,7 +20,7 @@ package org.apache.bcel.verifier.tests;
 
 public class TestArrayAccess01 extends XTestArray01{
 
-    public static void test(){
+    public static void test() {
         XTestArray01[] array = new TestArrayAccess01[1];
         array[0] = new XTestArray01();
     }

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeInterface01.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeInterface01.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeInterface01.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeInterface01.java Tue Jun 21 20:43:38 2016
@@ -19,7 +19,7 @@ package org.apache.bcel.verifier.tests;
 
 public class TestLegalInvokeInterface01{
 
-    public static void test1(final Interface01 t){
+    public static void test1(final Interface01 t) {
         t.run();
     }
 }

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial01.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial01.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial01.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial01.java Tue Jun 21 20:43:38 2016
@@ -19,7 +19,7 @@ package org.apache.bcel.verifier.tests;
 
 public class TestLegalInvokeSpecial01{
 
-    public static void test1(){
+    public static void test1() {
        new TestLegalInvokeSpecial01().getClass();
     }
     

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial02.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial02.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial02.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeSpecial02.java Tue Jun 21 20:43:38 2016
@@ -19,8 +19,8 @@ package org.apache.bcel.verifier.tests;
 
 public abstract class TestLegalInvokeSpecial02 implements Runnable{
 
-    public static void test1(final TestLegalInvokeSpecial02 t, final int i){
-        if(i > 0){
+    public static void test1(final TestLegalInvokeSpecial02 t, final int i) {
+        if(i > 0) {
             t.run();
         }
     }

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual01.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual01.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual01.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual01.java Tue Jun 21 20:43:38 2016
@@ -19,7 +19,7 @@ package org.apache.bcel.verifier.tests;
 
 public class TestLegalInvokeVirtual01 {
 
-    public static void test1(){
+    public static void test1() {
         new TestLegalInvokeVirtual01().toString();
     }
     

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual02.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual02.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual02.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestLegalInvokeVirtual02.java Tue Jun 21 20:43:38 2016
@@ -19,8 +19,8 @@ package org.apache.bcel.verifier.tests;
 
 public abstract class TestLegalInvokeVirtual02 implements Runnable{
 
-    public static void test1(final TestLegalInvokeVirtual02 t, final int i){
-        if(i > 0){
+    public static void test1(final TestLegalInvokeVirtual02 t, final int i) {
+        if(i > 0) {
             t.run();
         }
     }

Modified: commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestReturn02.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestReturn02.java?rev=1749600&r1=1749599&r2=1749600&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestReturn02.java (original)
+++ commons/proper/bcel/trunk/src/test/java/org/apache/bcel/verifier/tests/TestReturn02.java Tue Jun 21 20:43:38 2016
@@ -23,43 +23,43 @@ public class TestReturn02 {
         return new String(data, offset, count);
     }
     
-    public static Object test2(){
+    public static Object test2() {
         return new Object();
     }
     
-    public static boolean test3(){
+    public static boolean test3() {
         return true;
     }
     
-    public static byte test4(){
+    public static byte test4() {
         return 1;
     }
     
-    public static short test5(){
+    public static short test5() {
         return 1;
     }
     
-    public static char test6(){
+    public static char test6() {
         return 'a';
     }
     
-    public static int test7(){
+    public static int test7() {
         return 1;
     }
     
-    public static long test8(){
+    public static long test8() {
         return 1L;
     }
     
-    public static float test9(){
+    public static float test9() {
         return 1.0f;
     }
     
-    public static double test10(){
+    public static double test10() {
         return 1.0;
     }
     
-    public static Object test11(){
+    public static Object test11() {
         return null;
     }
 }