From: markt Date: Fri, 3 Sep 2010 17:50:32 +0000 (+0000) Subject: Trace through some unused code and remove it. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=fbf30fe97fd2287754fb17a4fc45dadf1a5f33ca;p=tomcat7.0 Trace through some unused code and remove it. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@992394 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java b/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java index def10aa3e..4125fdf18 100644 --- a/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java +++ b/java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java @@ -39,7 +39,6 @@ public class AnnotationEntry implements Constants, Serializable { private int type_index; private ConstantPool constant_pool; - private boolean isRuntimeVisible; private List element_value_pairs; @@ -51,9 +50,9 @@ public class AnnotationEntry implements Constants, Serializable { * @param isRuntimeVisible * @throws IOException */ - public static AnnotationEntry read(DataInputStream file, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException { + public static AnnotationEntry read(DataInputStream file, ConstantPool constant_pool) throws IOException { - final AnnotationEntry annotationEntry = new AnnotationEntry(file.readUnsignedShort(), constant_pool, isRuntimeVisible); + final AnnotationEntry annotationEntry = new AnnotationEntry(file.readUnsignedShort(), constant_pool); final int num_element_value_pairs = (file.readUnsignedShort()); annotationEntry.element_value_pairs = new ArrayList(); for (int i = 0; i < num_element_value_pairs; i++) { @@ -63,10 +62,9 @@ public class AnnotationEntry implements Constants, Serializable { return annotationEntry; } - public AnnotationEntry(int type_index, ConstantPool constant_pool, boolean isRuntimeVisible) { + public AnnotationEntry(int type_index, ConstantPool constant_pool) { this.type_index = type_index; this.constant_pool = constant_pool; - this.isRuntimeVisible = isRuntimeVisible; } /** diff --git a/java/org/apache/tomcat/util/bcel/classfile/Annotations.java b/java/org/apache/tomcat/util/bcel/classfile/Annotations.java index 5073c5c14..7a38f6a40 100644 --- a/java/org/apache/tomcat/util/bcel/classfile/Annotations.java +++ b/java/org/apache/tomcat/util/bcel/classfile/Annotations.java @@ -41,12 +41,12 @@ public abstract class Annotations extends Attribute { * @param file Input stream * @param constant_pool Array of constants */ - public Annotations(byte annotation_type, int name_index, int length, DataInputStream file, ConstantPool constant_pool, boolean isRuntimeVisible) throws IOException { + public Annotations(byte annotation_type, int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException { this(annotation_type, name_index, length, (AnnotationEntry[]) null, constant_pool); final int annotation_table_length = (file.readUnsignedShort()); annotation_table = new AnnotationEntry[annotation_table_length]; for (int i = 0; i < annotation_table_length; i++) { - annotation_table[i] = AnnotationEntry.read(file, constant_pool, isRuntimeVisible); + annotation_table[i] = AnnotationEntry.read(file, constant_pool); } } diff --git a/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java b/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java index 272003634..02627b8bb 100644 --- a/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java +++ b/java/org/apache/tomcat/util/bcel/classfile/ElementValue.java @@ -116,7 +116,7 @@ public abstract class ElementValue case '@': // Annotation // TODO isRuntimeVisible return new AnnotationElementValue(ANNOTATION, AnnotationEntry.read( - dis, cpool, false), cpool); + dis, cpool), cpool); case '[': // Array int numArrayVals = dis.readUnsignedShort(); ElementValue[] evalues = new ElementValue[numArrayVals]; diff --git a/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java b/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java index eb3343817..2cf5e8a90 100644 --- a/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java +++ b/java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java @@ -44,8 +44,7 @@ public class ParameterAnnotationEntry implements Constants { annotation_table_length = (file.readUnsignedShort()); annotation_table = new AnnotationEntry[annotation_table_length]; for (int i = 0; i < annotation_table_length; i++) { - // TODO isRuntimeVisible - annotation_table[i] = AnnotationEntry.read(file, constant_pool, false); + annotation_table[i] = AnnotationEntry.read(file, constant_pool); } } diff --git a/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java b/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java index 8abc678da..7a15f92b0 100644 --- a/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java +++ b/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java @@ -50,7 +50,7 @@ public class RuntimeInvisibleAnnotations extends Annotations throws IOException { super(Constants.ATTR_RUNTIMEIN_VISIBLE_ANNOTATIONS, name_index, length, - file, constant_pool, false); + file, constant_pool); } /** diff --git a/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java b/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java index 3eb414c0c..005dab9fa 100644 --- a/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java +++ b/java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java @@ -50,7 +50,7 @@ public class RuntimeVisibleAnnotations extends Annotations throws IOException { super(Constants.ATTR_RUNTIME_VISIBLE_ANNOTATIONS, name_index, length, - file, constant_pool, true); + file, constant_pool); } /**