Author: markt Date: Sat Nov 9 21:45:41 2013 New Revision: 1540413 URL: http://svn.apache.org/r1540413 Log: Remove Syntehtic. Swallow associated values as they are never used.
Removed: tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Synthetic.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=1540413&r1=1540412&r2=1540413&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 Sat Nov 9 21:45:41 2013 @@ -40,7 +40,6 @@ import org.apache.tomcat.util.bcel.Const * @see LineNumberTable * @see LocalVariableTable * @see InnerClasses - * @see Synthetic * @see Deprecated */ public abstract class Attribute implements Cloneable, Serializable @@ -119,7 +118,8 @@ public abstract class Attribute implemen case Constants.ATTR_INNER_CLASSES: return new InnerClasses(name_index, length, file, constant_pool); case Constants.ATTR_SYNTHETIC: - return new Synthetic(name_index, length, file, constant_pool); + Utility.swallowSynthetic(file, length); + return null; case Constants.ATTR_DEPRECATED: return new Deprecated(name_index, length, file, constant_pool); case Constants.ATTR_PMG: 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=1540413&r1=1540412&r2=1540413&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 Sat Nov 9 21:45:41 2013 @@ -162,4 +162,12 @@ final class Utility { static void swallowSignature(DataInput file) throws IOException { file.readUnsignedShort(); // Unused signature_index } + + static void swallowSynthetic(DataInput file, int length) throws IOException { + if (length > 0) { + byte[] bytes = new byte[length]; + file.readFully(bytes); + throw new ClassFormatException("Synthetic attribute with length > 0"); + } + } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org