tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1624110 - in /tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile: Attribute.java SourceFile.java Utility.java
Date Wed, 10 Sep 2014 20:23:02 GMT
Author: markt
Date: Wed Sep 10 20:23:01 2014
New Revision: 1624110

URL: http://svn.apache.org/r1624110
Log:
Remove unused code (SourceFile)

Removed:
    tomcat/trunk/java/org/apache/tomcat/util/bcel/classfile/SourceFile.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=1624110&r1=1624109&r2=1624110&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:23:01
2014
@@ -33,7 +33,6 @@ import org.apache.tomcat.util.bcel.Const
  *
  * @author <A HREF="mailto:m.dahm@gmx.de">M. Dahm</A>
  * @see ConstantValue
- * @see SourceFile
  * @see Code
  * @see ExceptionTable
  * @see LineNumberTable
@@ -104,7 +103,8 @@ public abstract class Attribute implemen
         case Constants.ATTR_CONSTANT_VALUE:
             return new ConstantValue(name_index, length, file, constant_pool);
         case Constants.ATTR_SOURCE_FILE:
-            return new SourceFile(name_index, length, file, constant_pool);
+            Utility.swallowSourceFile(file);
+            return null;
         case Constants.ATTR_CODE:
             return new Code(name_index, length, file, constant_pool);
         case Constants.ATTR_EXCEPTIONS:

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=1624110&r1=1624109&r2=1624110&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:23:01
2014
@@ -188,4 +188,8 @@ final class Utility {
             file.readUnsignedShort();   // Unused access_flags
         }
     }
+
+    static void swallowSourceFile(DataInput file) throws IOException {
+        file.readUnsignedShort();   // Unused sourcefile_index
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message