You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/09/17 13:15:24 UTC

svn commit: r1625516 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/bcel/ java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java

Author: markt
Date: Wed Sep 17 11:15:23 2014
New Revision: 1625516

URL: http://svn.apache.org/r1625516
Log:
Remove constant_pool_count field.
The field is never read, and its value is known from the length of constant_pool array created in constructor.
Backport of r1624588 from trunk

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1624588

Propchange: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/
------------------------------------------------------------------------------
  Merged /tomcat/trunk/java/org/apache/tomcat/util/bcel:r1624588

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java?rev=1625516&r1=1625515&r2=1625516&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/bcel/classfile/ConstantPool.java Wed Sep 17 11:15:23 2014
@@ -35,8 +35,7 @@ import org.apache.tomcat.util.bcel.Const
  */
 public class ConstantPool {
 
-    private int constant_pool_count;
-    private Constant[] constant_pool;
+    private final Constant[] constant_pool;
 
 
     /**
@@ -47,7 +46,7 @@ public class ConstantPool {
      * @throws ClassFormatException
      */
     ConstantPool(DataInputStream file) throws IOException, ClassFormatException {
-        constant_pool_count = file.readUnsignedShort();
+        int constant_pool_count = file.readUnsignedShort();
         constant_pool = new Constant[constant_pool_count];
         /* constant_pool[0] is unused by the compiler and may be used freely
          * by the implementation.



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