Author: kkolinko Date: Fri Sep 12 15:09:41 2014 New Revision: 1624565 URL: http://svn.apache.org/r1624565 Log: Remove length and constant_pool fields from Attribute class.
Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java?rev=1624565&r1=1624564&r2=1624565&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/AnnotationDefault.java Fri Sep 12 15:09:41 2014 @@ -29,16 +29,13 @@ import java.io.IOException; public class AnnotationDefault extends Attribute { /** - * @param length - * Content length in bytes * @param file * Input stream * @param constant_pool * Array of constants */ - public AnnotationDefault(int length, DataInputStream file, - ConstantPool constant_pool) throws IOException { - super(length, constant_pool); + public AnnotationDefault(DataInputStream file, ConstantPool constant_pool) + throws IOException { // Default value ElementValue.readElementValue(file, constant_pool); } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java?rev=1624565&r1=1624564&r2=1624565&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Annotations.java Fri Sep 12 15:09:41 2014 @@ -31,13 +31,11 @@ public abstract class Annotations extend private final AnnotationEntry[] annotation_table; /** - * @param length Content length in bytes * @param file Input stream * @param constant_pool Array of constants */ - public Annotations(int length, DataInputStream file, - ConstantPool constant_pool) throws IOException { - super(length, constant_pool); + public Annotations(DataInputStream file, ConstantPool constant_pool) + throws IOException { final int annotation_table_length = (file.readUnsignedShort()); annotation_table = new AnnotationEntry[annotation_table_length]; for (int i = 0; i < annotation_table_length; i++) { Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java?rev=1624565&r1=1624564&r2=1624565&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java Fri Sep 12 15:09:41 2014 @@ -34,15 +34,6 @@ import org.apache.tomcat.util.bcel.Const */ public abstract class Attribute { - protected int length; // Content length of attribute field - - protected ConstantPool constant_pool; - - protected Attribute(int length, ConstantPool constant_pool) { - this.length = length; - this.constant_pool = constant_pool; - } - /* * Class method reads one attribute from the input data stream. This method * must not be accessible from the outside. It is called by the Field and @@ -83,12 +74,11 @@ public abstract class Attribute { switch (tag) { case Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS: - return new RuntimeVisibleAnnotations(length, file, constant_pool); + return new RuntimeVisibleAnnotations(file, constant_pool); case Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS: - return new RuntimeVisibleParameterAnnotations(length, file, - constant_pool); + return new RuntimeVisibleParameterAnnotations(file, constant_pool); case Constants.ATTR_ANNOTATION_DEFAULT: - return new AnnotationDefault(length, file, constant_pool); + return new AnnotationDefault(file, constant_pool); default: // All other attributes are skipped Utility.skipFully(file, length); return null; Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java?rev=1624565&r1=1624564&r2=1624565&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotations.java Fri Sep 12 15:09:41 2014 @@ -33,13 +33,11 @@ public abstract class ParameterAnnotatio /** - * @param length Content length in bytes * @param file Input stream * @param constant_pool Array of constants */ - ParameterAnnotations(int length, DataInputStream file, - ConstantPool constant_pool) throws IOException { - super(length, constant_pool); + ParameterAnnotations(DataInputStream file, ConstantPool constant_pool) + throws IOException { num_parameters = (file.readUnsignedByte()); parameter_annotation_table = new ParameterAnnotationEntry[num_parameters]; for (int i = 0; i < num_parameters; i++) { Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java?rev=1624565&r1=1624564&r2=1624565&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java Fri Sep 12 15:09:41 2014 @@ -30,15 +30,13 @@ import java.io.IOException; public class RuntimeVisibleAnnotations extends Annotations { /** - * @param length - * Content length in bytes * @param file * Input stream * @param constant_pool * Array of constants */ - public RuntimeVisibleAnnotations(int length, DataInputStream file, + public RuntimeVisibleAnnotations(DataInputStream file, ConstantPool constant_pool) throws IOException { - super(length, file, constant_pool); + super(file, constant_pool); } } Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java?rev=1624565&r1=1624564&r2=1624565&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleParameterAnnotations.java Fri Sep 12 15:09:41 2014 @@ -30,12 +30,11 @@ import java.io.IOException; public class RuntimeVisibleParameterAnnotations extends ParameterAnnotations { /** - * @param length Content length in bytes * @param file Input stream * @param constant_pool Array of constants */ - RuntimeVisibleParameterAnnotations(int length, DataInputStream file, + RuntimeVisibleParameterAnnotations(DataInputStream file, ConstantPool constant_pool) throws IOException { - super(length, file, constant_pool); + super(file, constant_pool); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org