Author: markt
Date: Wed Sep 10 20:57:56 2014
New Revision: 1624126
URL: http://svn.apache.org/r1624126
Log:
Remove unused code (Deprecated)
Removed:
tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/Deprecated.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=1624126&r1=1624125&r2=1624126&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 Wed
Sep 10 20:57:56 2014
@@ -32,7 +32,6 @@ import org.apache.tomcat.util.bcel.Const
* attribute stands for non-standard-attributes.
*
* @author <A HREF="mailto:[email protected]">M. Dahm</A>
- * @see Deprecated
*/
public abstract class Attribute implements Cloneable, Serializable
{
@@ -119,7 +118,8 @@ public abstract class Attribute implemen
Utility.swallowSynthetic(file, length);
return null;
case Constants.ATTR_DEPRECATED:
- return new Deprecated(name_index, length, file, constant_pool);
+ Utility.swallowDeprecated(file, length);
+ return null;
case Constants.ATTR_PMG:
return new PMGClass(name_index, length, file, constant_pool);
case Constants.ATTR_SIGNATURE:
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=1624126&r1=1624125&r2=1624126&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 Wed
Sep 10 20:57:56 2014
@@ -246,4 +246,12 @@ final class Utility {
Utility.swallowInnerClass(file);
}
}
+
+ static void swallowDeprecated(DataInput file, int length) throws
IOException {
+ if (length > 0) {
+ byte[] bytes = new byte[length];
+ file.readFully(bytes);
+ throw new ClassFormatException("Deprecated attribute with length >
0");
+ }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]