jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From md...@apache.org
Subject cvs commit: jakarta-bcel/src/java/org/apache/bcel/generic ConstantPoolGen.java
Date Mon, 11 Feb 2002 10:45:36 GMT
mdahm       02/02/11 02:45:36

  Modified:    src/java/org/apache/bcel/generic ConstantPoolGen.java
  Log:
  bug-fix: lookup Utf8 first
  
  Revision  Changes    Path
  1.2       +4 -4      jakarta-bcel/src/java/org/apache/bcel/generic/ConstantPoolGen.java
  
  Index: ConstantPoolGen.java
  ===================================================================
  RCS file: /home/cvs/jakarta-bcel/src/java/org/apache/bcel/generic/ConstantPoolGen.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConstantPoolGen.java	29 Oct 2001 20:00:08 -0000	1.1
  +++ ConstantPoolGen.java	11 Feb 2002 10:45:36 -0000	1.2
  @@ -68,7 +68,7 @@
    * Constants.MAX_SHORT entries. Note that the first (0) is used by the
    * JVM and that Double and Long constants need two slots.
    *
  - * @version $Id: ConstantPoolGen.java,v 1.1 2001/10/29 20:00:08 jvanzyl Exp $
  + * @version $Id: ConstantPoolGen.java,v 1.2 2002/02/11 10:45:36 mdahm Exp $
    * @author  <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
    * @see Constant
    */
  @@ -201,12 +201,12 @@
       if((ret = lookupString(str)) != -1)
         return ret; // Already in CP
   
  +    int utf8 = addUtf8(str);
  +
       adjustSize();
   
  -    ConstantUtf8   u8 = new ConstantUtf8(str);
  -    ConstantString s  = new ConstantString(index);
  +    ConstantString s  = new ConstantString(utf8);
          
  -    constants[index++] = u8;
       ret = index;
       constants[index++] = s;
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:bcel-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:bcel-dev-help@jakarta.apache.org>


Mime
View raw message