You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2012/10/13 23:54:58 UTC

svn commit: r1397957 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/

Author: markt
Date: Sat Oct 13 21:54:57 2012
New Revision: 1397957

URL: http://svn.apache.org/viewvc?rev=1397957&view=rev
Log:
Remove unused code identified by Eclipse

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/CodeException.java Sat Oct 13 21:54:57 2012
@@ -43,12 +43,10 @@ public final class CodeException impleme
      * @throws IOException
      */
     CodeException(DataInput file) throws IOException {
-        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
-                .readUnsignedShort());
-    }
-
-
-    public CodeException(int start_pc, int end_pc, int handler_pc, int catch_type) {
+        file.readUnsignedShort();
+        file.readUnsignedShort();
+        file.readUnsignedShort();
+        file.readUnsignedShort();
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/InnerClass.java Sat Oct 13 21:54:57 2012
@@ -40,13 +40,10 @@ public final class InnerClass implements
      * @throws IOException
      */
     InnerClass(DataInput file) throws IOException {
-        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
-                .readUnsignedShort());
-    }
-
-
-    public InnerClass(int inner_class_index, int outer_class_index, int inner_name_index,
-            int inner_access_flags) {
+        file.readUnsignedShort();
+        file.readUnsignedShort();
+        file.readUnsignedShort();
+        file.readUnsignedShort();
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariable.java Sat Oct 13 21:54:57 2012
@@ -44,15 +44,12 @@ public final class LocalVariable impleme
      * @param file Input stream
      * @throws IOException
      */
-    LocalVariable(DataInput file, ConstantPool constant_pool) throws IOException {
-        this(file.readUnsignedShort(), file.readUnsignedShort(), file.readUnsignedShort(), file
-                .readUnsignedShort(), file.readUnsignedShort(), constant_pool);
-    }
-
-
-    public LocalVariable(int start_pc, int length, int name_index, int signature_index, int index,
-            ConstantPool constant_pool) {
-        this.index = index;
+    LocalVariable(DataInput file) throws IOException {
+        file.readUnsignedShort();
+        file.readUnsignedShort();
+        file.readUnsignedShort();
+        file.readUnsignedShort();
+        this.index = file.readUnsignedShort();
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTable.java Sat Oct 13 21:54:57 2012
@@ -65,7 +65,7 @@ public class LocalVariableTable extends 
         local_variable_table_length = (file.readUnsignedShort());
         local_variable_table = new LocalVariable[local_variable_table_length];
         for (int i = 0; i < local_variable_table_length; i++) {
-            local_variable_table[i] = new LocalVariable(file, constant_pool);
+            local_variable_table[i] = new LocalVariable(file);
         }
     }
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/LocalVariableTypeTable.java Sat Oct 13 21:54:57 2012
@@ -68,7 +68,7 @@ private int             local_variable_t
     local_variable_type_table = new LocalVariable[local_variable_type_table_length];
 
     for(int i=0; i < local_variable_type_table_length; i++)
-      local_variable_type_table[i] = new LocalVariable(dis, cpool);
+      local_variable_type_table[i] = new LocalVariable(dis);
   }
 
   public final void setLocalVariableTable(LocalVariable[] local_variable_table)

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/PMGClass.java Sat Oct 13 21:54:57 2012
@@ -33,7 +33,6 @@ import org.apache.tomcat.util.bcel.Const
 public final class PMGClass extends Attribute {
 
     private static final long serialVersionUID = -1876065562391587509L;
-    private int pmg_class_index, pmg_index;
 
 
     /**
@@ -46,22 +45,19 @@ public final class PMGClass extends Attr
      */
     PMGClass(int name_index, int length, DataInput file, ConstantPool constant_pool)
             throws IOException {
-        this(name_index, length, file.readUnsignedShort(), file.readUnsignedShort(), constant_pool);
+        this(name_index, length, constant_pool);
+        file.readUnsignedShort();
+        file.readUnsignedShort();
     }
 
 
     /**
      * @param name_index Index in constant pool to CONSTANT_Utf8
      * @param length Content length in bytes
-     * @param pmg_index index in constant pool for source file name
-     * @param pmg_class_index Index in constant pool to CONSTANT_Utf8
      * @param constant_pool Array of constants
      */
-    public PMGClass(int name_index, int length, int pmg_index, int pmg_class_index,
-            ConstantPool constant_pool) {
+    public PMGClass(int name_index, int length, ConstantPool constant_pool) {
         super(Constants.ATTR_PMG, name_index, length, constant_pool);
-        this.pmg_index = pmg_index;
-        this.pmg_class_index = pmg_class_index;
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Signature.java Sat Oct 13 21:54:57 2012
@@ -33,7 +33,6 @@ import org.apache.tomcat.util.bcel.Const
 public final class Signature extends Attribute {
 
     private static final long serialVersionUID = 7493781777025829964L;
-    private int signature_index;
 
 
     /**
@@ -46,19 +45,18 @@ public final class Signature extends Att
      */
     Signature(int name_index, int length, DataInput file, ConstantPool constant_pool)
             throws IOException {
-        this(name_index, length, file.readUnsignedShort(), constant_pool);
+        this(name_index, length, constant_pool);
+        file.readUnsignedShort();
     }
 
 
     /**
      * @param name_index Index in constant pool to CONSTANT_Utf8
      * @param length Content length in bytes
-     * @param signature_index Index in constant pool to CONSTANT_Utf8
      * @param constant_pool Array of constants
      */
-    public Signature(int name_index, int length, int signature_index, ConstantPool constant_pool) {
+    public Signature(int name_index, int length, ConstantPool constant_pool) {
         super(Constants.ATTR_SIGNATURE, name_index, length, constant_pool);
-        this.signature_index = signature_index;
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.java Sat Oct 13 21:54:57 2012
@@ -35,7 +35,6 @@ import org.apache.tomcat.util.bcel.Const
 public final class SourceFile extends Attribute {
 
     private static final long serialVersionUID = 332346699609443704L;
-    private int sourcefile_index;
 
 
     /**
@@ -48,7 +47,8 @@ public final class SourceFile extends At
      */
     SourceFile(int name_index, int length, DataInput file, ConstantPool constant_pool)
             throws IOException {
-        this(name_index, length, file.readUnsignedShort(), constant_pool);
+        this(name_index, length, constant_pool);
+        file.readUnsignedShort();
     }
 
 
@@ -58,16 +58,9 @@ public final class SourceFile extends At
      * @param length Content length in bytes, the value should be 2.
      * @param constant_pool The constant pool that this attribute is
      * associated with.
-     * @param sourcefile_index Index in constant pool to CONSTANT_Utf8.  This
-     * string will be interpreted as the name of the file from which this
-     * class was compiled.  It will not be interpreted as indicating the name
-     * of the directory contqining the file or an absolute path; this
-     * information has to be supplied the consumer of this attribute - in
-     * many cases, the JVM.
      */
-    public SourceFile(int name_index, int length, int sourcefile_index, ConstantPool constant_pool) {
+    public SourceFile(int name_index, int length, ConstantPool constant_pool) {
         super(Constants.ATTR_SOURCE_FILE, name_index, length, constant_pool);
-        this.sourcefile_index = sourcefile_index;
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapEntry.java Sat Oct 13 21:54:57 2012
@@ -36,13 +36,8 @@ public final class StackMapEntry impleme
     private static final long serialVersionUID = 1L;
 
     StackMapEntry(DataInputStream file) throws IOException {
-        this(file.readShort(), file.readShort(), null, -1, null);
-    }
-
-
-    public StackMapEntry(int byte_code_offset, int number_of_locals,
-            StackMapType[] types_of_locals, int number_of_stack_items,
-            StackMapType[] types_of_stack_items) {
+        file.readShort();
+        file.readShort();
     }
 
 

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java?rev=1397957&r1=1397956&r2=1397957&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapTableEntry.java Sat Oct 13 21:54:57 2012
@@ -42,13 +42,7 @@ public final class StackMapTableEntry im
      * @throws IOException
      */
     StackMapTableEntry(DataInputStream file) throws IOException {
-        this(file.read(), -1, -1, null, -1, null);
-    }
-
-
-    public StackMapTableEntry(int tag, int byte_code_offset_delta, int number_of_locals,
-            StackMapType[] types_of_locals, int number_of_stack_items,
-            StackMapType[] types_of_stack_items) {
+        file.read();
     }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org