[jboss-cvs] javassist/src/main/javassist/bytecode ...

Shigeru Chiba chiba at is.titech.ac.jp
Wed Mar 18 08:49:41 EDT 2009


  User: chiba   
  Date: 09/03/18 08:49:41

  Modified:    src/main/javassist/bytecode  CodeIterator.java
  Log:
  the previous revision was wrong.  this is a right fix for JASSIST-74
  
  Revision  Changes    Path
  1.18      +15 -12    javassist/src/main/javassist/bytecode/CodeIterator.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CodeIterator.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/bytecode/CodeIterator.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- CodeIterator.java	18 Mar 2009 12:20:53 -0000	1.17
  +++ CodeIterator.java	18 Mar 2009 12:49:41 -0000	1.18
  @@ -718,12 +718,13 @@
   
                   int i0 = i;
                   int i2 = (i & ~3) + 4;  // 0-3 byte padding
  -                while (i0 < i2) {
  -                    // IBM JVM 1.4.2 cannot run the following line:
  +                // IBM JVM 1.4.2 cannot run the following code:
  +                // while (i0 < i2)
                       // newcode[j++] = code[i0++];
                       // see JIRA JASSIST-74.
  -                    newcode[j++] = 0; i0++;
  -                }
  +                newcode[j++] = (byte)TABLESWITCH;
  +                while (++i0 < i2)
  +                    newcode[j++] = 0;
   
                   int defaultbyte = newOffset(i, ByteArray.read32bit(code, i2),
                                               where, gapLength, exclusive);
  @@ -749,12 +750,14 @@
   
                   int i0 = i;
                   int i2 = (i & ~3) + 4;  // 0-3 byte padding
  -                while (i0 < i2) {
  -                    // IBM JVM 1.4.2 cannot run the following line:
  +
  +                // IBM JVM 1.4.2 cannot run the following code:
  +                // while (i0 < i2)
                       // newcode[j++] = code[i0++];
                       // see JIRA JASSIST-74.
  -                    newcode[j++] = 0; i0++;
  -                }
  +                newcode[j++] = (byte)LOOKUPSWITCH;
  +                while (++i0 < i2)
  +                    newcode[j++] = 0;
   
                   int defaultbyte = newOffset(i, ByteArray.read32bit(code, i2),
                                               where, gapLength, exclusive);
  
  
  



More information about the jboss-cvs-commits mailing list