Author: markt Date: Thu Sep 11 08:20:30 2014 New Revision: 1624220 URL: http://svn.apache.org/r1624220 Log: Remove unused code (RuntimeInvisible[Parameter]Annotations)
Removed: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleAnnotations.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/RuntimeInvisibleParameterAnnotations.java Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Attribute.java tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java 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=1624220&r1=1624219&r2=1624220&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 Thu Sep 11 08:20:30 2014 @@ -133,14 +133,14 @@ public abstract class Attribute implemen return new RuntimeVisibleAnnotations(name_index, length, file, constant_pool); case Constants.ATTR_RUNTIME_INVISIBLE_ANNOTATIONS: - return new RuntimeInvisibleAnnotations(name_index, length, file, - constant_pool); + Utility.swallowAnnotations(file, constant_pool); + return null; case Constants.ATTR_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS: return new RuntimeVisibleParameterAnnotations(name_index, length, file, constant_pool); case Constants.ATTR_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS: - return new RuntimeInvisibleParameterAnnotations(name_index, length, - file, constant_pool); + Utility.swallowAnnotations(file, constant_pool); + return null; case Constants.ATTR_ANNOTATION_DEFAULT: return new AnnotationDefault(name_index, length, file, constant_pool); Modified: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java?rev=1624220&r1=1624219&r2=1624220&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Utility.java Thu Sep 11 08:20:30 2014 @@ -295,4 +295,12 @@ final class Utility { file.readUnsignedShort(); // Unused bootstrap_method_attr_index file.readUnsignedShort(); // Unused name_and_type_index } + + static void swallowAnnotations(DataInputStream file, ConstantPool constant_pool) + throws IOException { + final int annotation_table_length = (file.readUnsignedShort()); + for (int i = 0; i < annotation_table_length; i++) { + AnnotationEntry.read(file, constant_pool); + } + } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org