svn commit: r226663 - in /jakarta/bcel/trunk/src/java/org/apache/bcel: ./ classfile/ generic/

[email protected]
Newsgroups gmane.comp.jakarta.bcel.devel
Message-ID <[email protected]>
Author: dbrosius
Date: Sun Jul 31 10:15:35 2005
New Revision: 226663

URL: http://svn.apache.org/viewcvs?rev=226663&view=rev
Log:
simple warnings cleanups

Modified:
    jakarta/bcel/trunk/src/java/org/apache/bcel/Repository.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Code.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantValue.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Deprecated.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/DescendingVisitor.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ExceptionTable.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Field.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/FieldOrMethod.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/InnerClasses.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LineNumberTable.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LocalVariableTable.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Method.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/PMGClass.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Signature.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/SourceFile.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/StackMap.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Synthetic.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Unknown.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Utility.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ArrayType.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BasicType.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchHandle.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchInstruction.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ClassGen.java
    jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ConstantPoolGen.java

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/Repository.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/Repository.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/Repository.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/Repository.java Sun Jul 31 10:15:35 2005
@@ -83,11 +83,9 @@
 			try {
 					ClassPath path = _repository.getClassPath();
 
-					if(path != null) {
-							return path.getClassFile(class_name);
-					}	else {
+					if(path == null)
 						return null;
-					}
+					return path.getClassFile(class_name);
 							
 			} catch(IOException e) { return null; }
 	}

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Code.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Code.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Code.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Code.java Sun Jul 31 10:15:35 2005
@@ -319,9 +319,9 @@
   /**
    * @return deep copy of this attribute
    * 
-   * @param constant_pool the constant pool to duplicate
+   * @param _constant_pool the constant pool to duplicate
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     Code c = (Code) clone();
 
     if (code != null) {
@@ -329,7 +329,7 @@
         System.arraycopy(code, 0, c.code, 0, code.length);
     }
 
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
   
     c.exception_table = new CodeException[exception_table_length];
     for(int i=0; i < exception_table_length; i++)
@@ -337,7 +337,7 @@
 
     c.attributes = new Attribute[attributes_count];
     for(int i=0; i < attributes_count; i++)
-      c.attributes[i] = attributes[i].copy(constant_pool);
+      c.attributes[i] = attributes[i].copy(_constant_pool);
 
     return c;
   }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantPool.java Sun Jul 31 10:15:35 2005
@@ -230,11 +230,11 @@
     if(c == null)
       throw new ClassFormatException("Constant pool at index " + index + " is null.");
 
-    if(c.getTag() == tag)
-      return c;
-    else
+    if(c.getTag() != tag)
       throw new ClassFormatException("Expected class `" + Constants.CONSTANT_NAMES[tag] + 
 				 "' at index " + index + " and got " + c);
+    
+    return c;
   }
 
   /**

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantValue.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantValue.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantValue.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ConstantValue.java Sun Jul 31 10:15:35 2005
@@ -135,9 +135,9 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     ConstantValue c = (ConstantValue)clone();
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Deprecated.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Deprecated.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Deprecated.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Deprecated.java Sun Jul 31 10:15:35 2005
@@ -122,7 +122,7 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     Deprecated c = (Deprecated)clone();
 
     if (bytes != null) {
@@ -130,7 +130,7 @@
         System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
     }
 
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/DescendingVisitor.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/DescendingVisitor.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/DescendingVisitor.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/DescendingVisitor.java Sun Jul 31 10:15:35 2005
@@ -71,23 +71,23 @@
    */
   public void visit() { clazz.accept(this); }
 
-  public void visitJavaClass(JavaClass clazz) {
-    stack.push(clazz);
-    clazz.accept(visitor);
+  public void visitJavaClass(JavaClass _clazz) {
+    stack.push(_clazz);
+    _clazz.accept(visitor);
 
-    Field[] fields = clazz.getFields();
+    Field[] fields = _clazz.getFields();
     for(int i=0; i < fields.length; i++)
       fields[i].accept(this);
 
-    Method[] methods = clazz.getMethods();
+    Method[] methods = _clazz.getMethods();
     for(int i=0; i < methods.length; i++)
       methods[i].accept(this);
 
-    Attribute[] attributes = clazz.getAttributes();
+    Attribute[] attributes = _clazz.getAttributes();
     for(int i=0; i < attributes.length; i++)
       attributes[i].accept(this);
 
-    clazz.getConstantPool().accept(this);
+    _clazz.getConstantPool().accept(this);
     stack.pop();
   }
 

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ExceptionTable.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ExceptionTable.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ExceptionTable.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/ExceptionTable.java Sun Jul 31 10:15:35 2005
@@ -158,7 +158,7 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     ExceptionTable c = (ExceptionTable)clone();
 
     if (exception_index_table != null) {
@@ -166,7 +166,7 @@
         System.arraycopy(exception_index_table, 0, c.exception_index_table, 0, exception_index_table.length);
     }
     
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Field.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Field.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Field.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Field.java Sun Jul 31 10:15:35 2005
@@ -134,8 +134,8 @@
   /**
    * @return deep copy of this field
    */
-  public final Field copy(ConstantPool constant_pool) {
-    return (Field)copy_(constant_pool);
+  public final Field copy(ConstantPool _constant_pool) {
+    return (Field)copy_(_constant_pool);
   }
 
   /**

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/FieldOrMethod.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/FieldOrMethod.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/FieldOrMethod.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/FieldOrMethod.java Sun Jul 31 10:15:35 2005
@@ -194,7 +194,7 @@
   /**
    * @return deep copy of this field
    */
-  protected FieldOrMethod copy_(ConstantPool constant_pool) {
+  protected FieldOrMethod copy_(ConstantPool _constant_pool) {
     FieldOrMethod c = null;
 
     try {
@@ -202,11 +202,11 @@
     } catch (CloneNotSupportedException e) {
     }
 
-    c.constant_pool = constant_pool;
+    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);
+      c.attributes[i] = attributes[i].copy(_constant_pool);
 
     return c;
   }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/InnerClasses.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/InnerClasses.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/InnerClasses.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/InnerClasses.java Sun Jul 31 10:15:35 2005
@@ -132,14 +132,14 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     InnerClasses c = (InnerClasses)clone();
 
     c.inner_classes = new InnerClass[number_of_classes];
     for(int i=0; i < number_of_classes; i++)
       c.inner_classes[i] = inner_classes[i].copy();
 
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/JavaClass.java Sun Jul 31 10:15:35 2005
@@ -280,11 +280,11 @@
   /** 
    * Dump class to a file named file_name.
    *
-   * @param file_name Output file name
+   * @param _file_name Output file name
    * @exception IOException
    */
-  public void dump(String file_name) throws IOException {
-    dump(new File(file_name));
+  public void dump(String _file_name) throws IOException {
+    dump(new File(_file_name));
   }
 
   /**
@@ -484,17 +484,14 @@
 
   static {
     // Debugging ... on/off
-    String debug = System.getProperty("JavaClass.debug");
-
-    if (debug != null)
-      JavaClass.debug = new Boolean(debug).booleanValue();
+    debug = Boolean.getBoolean("JavaClass.debug");
 
     // Get path separator either / or \ usually
-    String sep = System.getProperty("file.separator");
+    String _sep = System.getProperty("file.separator");
 
-    if (sep != null)
+    if (_sep != null)
       try {
-        JavaClass.sep = sep.charAt(0);
+        JavaClass.sep = _sep.charAt(0);
       } catch (StringIndexOutOfBoundsException e) {
       } // Never reached
   }
@@ -817,11 +814,11 @@
    * Get interfaces directly implemented by this JavaClass.
    */
   public JavaClass[] getInterfaces() throws ClassNotFoundException {
-    String[] interfaces = getInterfaceNames();
-    JavaClass[] classes = new JavaClass[interfaces.length];
+    String[] _interfaces = getInterfaceNames();
+    JavaClass[] classes = new JavaClass[_interfaces.length];
 
-    for (int i = 0; i < interfaces.length; i++) {
-      classes[i] = repository.loadClass(interfaces[i]);
+    for (int i = 0; i < _interfaces.length; i++) {
+      classes[i] = repository.loadClass(_interfaces[i]);
     }
 
     return classes;
@@ -840,7 +837,7 @@
       JavaClass clazz = queue.dequeue();
 
       JavaClass souper = clazz.getSuperClass();
-      JavaClass[] interfaces = clazz.getInterfaces();
+      JavaClass[] _interfaces = clazz.getInterfaces();
 
       if (clazz.isInterface()) {
     	  allInterfaces.add(clazz);
@@ -850,8 +847,8 @@
         }
       }
 
-      for (int i = 0; i < interfaces.length; i++) {
-        queue.enqueue(interfaces[i]);
+      for (int i = 0; i < _interfaces.length; i++) {
+        queue.enqueue(_interfaces[i]);
       }
     }
 

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LineNumberTable.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LineNumberTable.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LineNumberTable.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LineNumberTable.java Sun Jul 31 10:15:35 2005
@@ -190,14 +190,14 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     LineNumberTable c = (LineNumberTable)clone();
 
     c.line_number_table = new LineNumber[line_number_table_length];
     for(int i=0; i < line_number_table_length; i++)
       c.line_number_table[i] = line_number_table[i].copy();
 
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LocalVariableTable.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LocalVariableTable.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LocalVariableTable.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/LocalVariableTable.java Sun Jul 31 10:15:35 2005
@@ -174,14 +174,14 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     LocalVariableTable c = (LocalVariableTable)clone();
 
     c.local_variable_table = new LocalVariable[local_variable_table_length];
     for(int i=0; i < local_variable_table_length; i++)
       c.local_variable_table[i] = local_variable_table[i].copy();
 
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Method.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Method.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Method.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Method.java Sun Jul 31 10:15:35 2005
@@ -128,10 +128,10 @@
   public final LocalVariableTable getLocalVariableTable() {
     Code code = getCode();
 
-    if (code != null)
-      return code.getLocalVariableTable();
-    else
-      return null;
+    if (code == null)
+    	return null;
+    
+    return code.getLocalVariableTable();
   }
 
   /** @return LineNumberTable of code attribute if any, i.e. the call is forwarded
@@ -140,10 +140,10 @@
   public final LineNumberTable getLineNumberTable() {
     Code code = getCode();
 
-    if (code != null)
-      return code.getLineNumberTable();
-    else
+    if (code == null)
       return null;
+    
+    return code.getLineNumberTable();
   }
 
   /**
@@ -201,8 +201,8 @@
   /**
    * @return deep copy of this method
    */
-  public final Method copy(ConstantPool constant_pool) {
-    return (Method)copy_(constant_pool);
+  public final Method copy(ConstantPool _constant_pool) {
+    return (Method)copy_(_constant_pool);
   }
 
   /**

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/PMGClass.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/PMGClass.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/PMGClass.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/PMGClass.java Sun Jul 31 10:15:35 2005
@@ -149,7 +149,7 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     return (PMGClass)clone();
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Signature.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Signature.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Signature.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Signature.java Sun Jul 31 10:15:35 2005
@@ -129,10 +129,6 @@
     return ch == 'T' || ch == 'L';
   }
 
-  private static boolean identPart(int ch) {
-    return ch == '/' || ch == ';';
-  }
-
   private static final void matchIdent(MyByteArrayInputStream in, StringBuffer buf) {
     int ch;
 
@@ -256,7 +252,7 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     return (Signature)clone();
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/SourceFile.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/SourceFile.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/SourceFile.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/SourceFile.java Sun Jul 31 10:15:35 2005
@@ -132,7 +132,7 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     return (SourceFile)clone();
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/StackMap.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/StackMap.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/StackMap.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/StackMap.java Sun Jul 31 10:15:35 2005
@@ -124,14 +124,14 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     StackMap c = (StackMap)clone();
 
     c.map = new StackMapEntry[map_length];
     for(int i=0; i < map_length; i++)
       c.map[i] = map[i].copy();
 
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Synthetic.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Synthetic.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Synthetic.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Synthetic.java Sun Jul 31 10:15:35 2005
@@ -129,7 +129,7 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     Synthetic c = (Synthetic)clone();
 
     if (bytes != null) {
@@ -137,7 +137,7 @@
         System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
     }
 
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Unknown.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Unknown.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Unknown.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Unknown.java Sun Jul 31 10:15:35 2005
@@ -140,7 +140,7 @@
   public final String getName() { return name; }    
 
   /**
-   * @param bytes.
+   * @param bytes the bytes to set
    */
   public final void setBytes(byte[] bytes) {
     this.bytes = bytes;
@@ -168,7 +168,7 @@
   /**
    * @return deep copy of this attribute
    */
-  public Attribute copy(ConstantPool constant_pool) {
+  public Attribute copy(ConstantPool _constant_pool) {
     Unknown c = (Unknown)clone();
 
     if (bytes != null) {
@@ -176,7 +176,7 @@
         System.arraycopy(bytes, 0, c.bytes, 0, bytes.length);
     }
 
-    c.constant_pool = constant_pool;
+    c.constant_pool = _constant_pool;
     return c;
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Utility.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Utility.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Utility.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/classfile/Utility.java Sun Jul 31 10:15:35 2005
@@ -485,14 +485,6 @@
     return compactClassName(str, "java.lang.", chopit);
   }    
 
-  private static final boolean is_digit(char ch) {
-    return (ch >= '0') && (ch <= '9');
-  }    
-  
-  private static final boolean is_space(char ch) {
-    return (ch == ' ') || (ch == '\t') || (ch == '\r') || (ch == '\n');
-  }    
-
   /**
    * @return `flag' with bit `i' set to 1
    */
@@ -586,9 +578,7 @@
       throw new ClassFormatException("Invalid method signature: " + signature);
     }
 	
-    types = new String[vec.size()];
-    vec.toArray(types);
-    return types;
+    return (String[])vec.toArray(new String[vec.size()]);
   }      
   /**
    * @param  signature    Method signature
@@ -845,7 +835,7 @@
 
       case '[' : { // Array declaration
 	int          n;
-	StringBuffer buf, brackets;
+	StringBuffer brackets;
 	String       type;
 	char         ch;
 	int          consumed_chars; // Shadows global var
@@ -1099,8 +1089,8 @@
 
     if(left_justify)
       return str + new String(buf);    
-    else
-      return new String(buf) + str;
+
+    return new String(buf) + str;
   }
 
   static final boolean equals(byte[] a, byte[] b) {
@@ -1251,8 +1241,8 @@
 
   // A-Z, g-z, _, $
   private static final int   FREE_CHARS  = 48;
-  private static       int[] CHAR_MAP    = new int[FREE_CHARS];
-  private static       int[] MAP_CHAR    = new int[256]; // Reverse map
+          static       int[] CHAR_MAP    = new int[FREE_CHARS];
+          static       int[] MAP_CHAR    = new int[256]; // Reverse map
   private static final char  ESCAPE_CHAR = '$';
 
   static {
@@ -1288,28 +1278,25 @@
     public int read() throws IOException {
       int b = in.read();
 
-      if(b != ESCAPE_CHAR) {
-	return b;
-      } else {
-	int i = in.read();
-
-	if(i < 0)
-	  return -1;
+      if(b != ESCAPE_CHAR)
+    	  return b;
+      
+      int i = in.read();
+	  if(i < 0)
+	    return -1;
 
-	if(((i >= '0') && (i <= '9')) || ((i >= 'a') && (i <= 'f'))) { // Normal escape
-	  int j = in.read();
+	  if(((i >= '0') && (i <= '9')) || ((i >= 'a') && (i <= 'f'))) { // Normal escape
+	    int j = in.read();
 
-	  if(j < 0)
-	    return -1;
+	    if(j < 0)
+	      return -1;
 
-	  char[] tmp = { (char)i, (char)j };
-	  int    s   = Integer.parseInt(new String(tmp), 16);
+	    char[] tmp = { (char)i, (char)j };
+	    int s   = Integer.parseInt(new String(tmp), 16);
 
-	  return s;
-	} else { // Special escape
+	    return s;
+	  }
 	  return MAP_CHAR[i];
-	}
-      }
     }
 
     public int read(char[] cbuf, int off, int len) throws IOException {

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ArrayType.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ArrayType.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ArrayType.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ArrayType.java Sun Jul 31 10:15:35 2005
@@ -95,8 +95,8 @@
   public Type getElementType() {
     if(dimensions == 1)
       return basic_type;
-    else
-      return new ArrayType(basic_type, dimensions - 1);
+
+    return new ArrayType(basic_type, dimensions - 1);
   }
 
   /** @return number of dimensions of array
@@ -109,11 +109,12 @@
 
   /** @return true if both type objects refer to the same array type.
    */
-  public boolean equals(Object type) {
-    if(type instanceof ArrayType) {
-      ArrayType array = (ArrayType)type;
+  public boolean equals(Object _type) {
+    if(_type instanceof ArrayType) {
+      ArrayType array = (ArrayType)_type;
       return (array.dimensions == dimensions) && array.basic_type.equals(basic_type);
-    } else
-      return false;
+    }
+    
+    return false;
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BasicType.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BasicType.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BasicType.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BasicType.java Sun Jul 31 10:15:35 2005
@@ -57,12 +57,12 @@
 
   /** @return a hash code value for the object.
    */
-  public int hashCode() { return (int)type; }
+  public int hashCode() { return type; }
 
   /** @return true if both type objects refer to the same type
    */
-  public boolean equals(Object type) {
-    return (type instanceof BasicType)?
-      ((BasicType)type).type == this.type : false;
+  public boolean equals(Object _type) {
+    return (_type instanceof BasicType)?
+      ((BasicType)_type).type == this.type : false;
   }
 }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchHandle.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchHandle.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchHandle.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchHandle.java Sun Jul 31 10:15:35 2005
@@ -44,14 +44,13 @@
   static final BranchHandle getBranchHandle(BranchInstruction i) {
     if(bh_list == null)
       return new BranchHandle(i);
-    else {
-      BranchHandle bh = bh_list;
-      bh_list = (BranchHandle)bh.next;
+    
+    BranchHandle bh = bh_list;
+    bh_list = (BranchHandle)bh.next;
 
-      bh.setInstruction(i);
+    bh.setInstruction(i);
 
-      return bh;
-    }
+    return bh;
   }
   
   /** Handle adds itself to the list of resuable handles.

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchInstruction.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchInstruction.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchInstruction.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/generic/BranchInstruction.java Sun Jul 31 10:15:35 2005
@@ -66,19 +66,19 @@
   }
 
   /**
-   * @param target branch target
+   * @param _target branch target
    * @return the offset to  `target' relative to this instruction
    */
-  protected int getTargetOffset(InstructionHandle target) {
-    if(target == null)
+  protected int getTargetOffset(InstructionHandle _target) {
+    if(_target == null)
       throw new ClassGenException("Target of " + super.toString(true) + 
 				  " is invalid null handle");
 
-    int t = target.getPosition();
+    int t = _target.getPosition();
 
     if(t < 0)
       throw new ClassGenException("Invalid branch target position offset for " +
-				  super.toString(true) + ":" + t + ":" + target);
+				  super.toString(true) + ":" + t + ":" + _target);
 
     return t - position;
   }

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ClassGen.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ClassGen.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ClassGen.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ClassGen.java Sun Jul 31 10:15:35 2005
@@ -171,7 +171,7 @@
     Attribute[] attributes = getAttributes();
 
     // Must be last since the above calls may still add something to it
-    ConstantPool cp = this.cp.getFinalConstantPool();
+    ConstantPool _cp = this.cp.getFinalConstantPool();
 
     return new JavaClass(
       class_name_index,
@@ -180,7 +180,7 @@
       major,
       minor,
       access_flags,
-      cp,
+      _cp,
       interfaces,
       fields,
       methods,
@@ -385,9 +385,7 @@
   }
 
   public Method[] getMethods() {
-    Method[] methods = new Method[method_vec.size()];
-    method_vec.toArray(methods);
-    return methods;
+    return (Method[])method_vec.toArray(new Method[method_vec.size()]);
   }
 
   public void setMethods(Method[] methods) {
@@ -423,15 +421,11 @@
   }
 
   public Field[] getFields() {
-    Field[] fields = new Field[field_vec.size()];
-    field_vec.toArray(fields);
-    return fields;
+    return (Field[])field_vec.toArray(new Field[field_vec.size()]);
   }
 
   public Attribute[] getAttributes() {
-    Attribute[] attributes = new Attribute[attribute_vec.size()];
-    attribute_vec.toArray(attributes);
-    return attributes;
+    return (Attribute[])attribute_vec.toArray(new Attribute[attribute_vec.size()]);
   }
 
   public ConstantPoolGen getConstantPool() {

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ConstantPoolGen.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ConstantPoolGen.java?rev=226663&r1=226662&r2=226663&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ConstantPoolGen.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/generic/ConstantPoolGen.java Sun Jul 31 10:15:35 2005
@@ -462,8 +462,8 @@
    * @return index on success, -1 otherwise
    */
   public int lookupNameAndType(String name, String signature) {
-    Index index = (Index)n_a_t_table.get(name + NAT_DELIM + signature);
-    return (index != null)? index.index : -1;
+    Index _index = (Index)n_a_t_table.get(name + NAT_DELIM + signature);
+    return (_index != null)? _index.index : -1;
   }
 
   /**
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.