Trace through some unused code and remove it.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 3 Sep 2010 17:50:32 +0000 (17:50 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 3 Sep 2010 17:50:32 +0000 (17:50 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@992394 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/tomcat/util/bcel/classfile/AnnotationEntry.java
java/org/apache/tomcat/util/bcel/classfile/Annotations.java
java/org/apache/tomcat/util/bcel/classfile/ElementValue.java
java/org/apache/tomcat/util/bcel/classfile/ParameterAnnotationEntry.java
java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java
java/org/apache/tomcat/util/bcel/classfile/RuntimeVisibleAnnotations.java

index def10aa..4125fdf 100644 (file)
@@ -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;
     }
     
     /**
index 5073c5c..7a38f6a 100644 (file)
@@ -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);
         }
     }
 
index 2720036..02627b8 100644 (file)
@@ -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];
index eb33438..2cf5e8a 100644 (file)
@@ -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);
         }
     }
     
index 8abc678..7a15f92 100644 (file)
@@ -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);
     }
 
     /**
index 3eb414c..005dab9 100644 (file)
@@ -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);
     }
 
     /**