Author: markt Date: Sun Oct 14 00:23:04 2012 New Revision: 1397977 URL: http://svn.apache.org/viewvc?rev=1397977&view=rev Log: Remove more unused code
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java?rev=1397977&r1=1397976&r2=1397977&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/StackMapType.java Sun Oct 14 00:23:04 2012 @@ -18,7 +18,6 @@ package org.apache.tomcat.util.bcel.classfile; import java.io.DataInput; -import java.io.DataOutputStream; import java.io.IOException; import java.io.Serializable; @@ -39,7 +38,6 @@ public final class StackMapType implemen private static final long serialVersionUID = 1L; private byte type; - private int index = -1; // Index to CONSTANT_Class or offset /** @@ -48,23 +46,13 @@ public final class StackMapType implemen * @throws IOException */ StackMapType(DataInput file) throws IOException { - this(file.readByte(), -1); + setType(file.readByte()); if (hasIndex()) { - setIndex(file.readShort()); + file.readShort(); // Unused index } } - /** - * @param type type tag as defined in the Constants interface - * @param index index to constant pool, or byte code offset - */ - public StackMapType(byte type, int index) { - setType(type); - setIndex(index); - } - - public void setType( byte t ) { if ((t < Constants.ITEM_Bogus) || (t > Constants.ITEM_NewObject)) { throw new RuntimeException("Illegal type for StackMapType: " + t); @@ -73,33 +61,6 @@ public final class StackMapType implemen } - public void setIndex( int t ) { - index = t; - } - - - /** @return index to constant pool if type == ITEM_Object, or offset - * in byte code, if type == ITEM_NewObject, and -1 otherwise - */ - public int getIndex() { - return index; - } - - - /** - * Dump type entries to file. - * - * @param file Output file stream - * @throws IOException - */ - public final void dump( DataOutputStream file ) throws IOException { - file.writeByte(type); - if (hasIndex()) { - file.writeShort(getIndex()); - } - } - - /** @return true, if type is either ITEM_Object or ITEM_NewObject */ public final boolean hasIndex() { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org