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/08/26 23:01:46 UTC

svn commit: r1377518 - /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java

Author: markt
Date: Sun Aug 26 21:01:46 2012
New Revision: 1377518

URL: http://svn.apache.org/viewvc?rev=1377518&view=rev
Log:
Remove unused attributes

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java?rev=1377518&r1=1377517&r2=1377518&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/EnclosingMethod.java Sun Aug 26 21:01:46 2012
@@ -29,35 +29,18 @@ public class EnclosingMethod extends Att
 
     private static final long serialVersionUID = 6755214228300933233L;
 
-    // Pointer to the CONSTANT_Class_info structure representing the
-    // innermost class that encloses the declaration of the current class.
-    private int classIndex;
-
-    // If the current class is not immediately enclosed by a method or
-    // constructor, then the value of the method_index item must be zero.
-    // Otherwise, the value of the  method_index item must point to a
-    // CONSTANT_NameAndType_info structure representing the name and the
-    // type of a method in the class referenced by the class we point
-    // to in the class_index.  *It is the compiler responsibility* to
-    // ensure that the method identified by this index is the closest
-    // lexically enclosing method that includes the local/anonymous class.
-    private int methodIndex;
-
     // Ctors - and code to read an attribute in.
-    public EnclosingMethod(int nameIndex, int len, DataInputStream dis, ConstantPool cpool) throws IOException {
-        this(nameIndex, len, dis.readUnsignedShort(), dis.readUnsignedShort(), cpool);
-    }
-
-    private EnclosingMethod(int nameIndex, int len, int classIdx,int methodIdx, ConstantPool cpool) {
+    public EnclosingMethod(int nameIndex, int len, DataInputStream dis,
+            ConstantPool cpool) throws IOException {
         super(Constants.ATTR_ENCLOSING_METHOD, nameIndex, len, cpool);
-        classIndex  = classIdx;
-        methodIndex = methodIdx;
+        // Unused class index
+        dis.readUnsignedShort();
+        // Unused method index
+        dis.readUnsignedShort();
     }
 
     @Override
     public Attribute copy(ConstantPool constant_pool) {
         throw new RuntimeException("Not implemented yet!");
-        // is this next line sufficient?
-        // return (EnclosingMethod)clone();
     }
 }



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