diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2009-03-18 12:20:53 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2009-03-18 12:20:53 +0000 |
commit | 43217031ebc53b96aeb11ac1fc4bb7d5d86bf9cf (patch) | |
tree | 1d62f75d474076cf5317fd51858f3118fa855708 | |
parent | c7d9aa3efcc3470d7c637835e51c2755e6e53ef8 (diff) | |
download | javassist-43217031ebc53b96aeb11ac1fc4bb7d5d86bf9cf.tar.gz javassist-43217031ebc53b96aeb11ac1fc4bb7d5d86bf9cf.zip |
JASSIST-74
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@469 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r-- | src/main/javassist/bytecode/CodeIterator.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/main/javassist/bytecode/CodeIterator.java b/src/main/javassist/bytecode/CodeIterator.java index cd0bb352..d93e46b8 100644 --- a/src/main/javassist/bytecode/CodeIterator.java +++ b/src/main/javassist/bytecode/CodeIterator.java @@ -376,7 +376,7 @@ public class CodeIterator implements Opcode { * Inserts a gap * before the next instruction that would be returned by * <code>next()</code> (not before the instruction returned - * by tha last call to <code>next()</code>). + * by the last call to <code>next()</code>). * Branch offsets and the exception table are also updated. * The inserted gap is filled with NOP. The gap length may be * extended to a multiple of 4. @@ -718,8 +718,12 @@ public class CodeIterator implements Opcode { int i0 = i; int i2 = (i & ~3) + 4; // 0-3 byte padding - while (i0 < i2) - newcode[j++] = code[i0++]; + while (i0 < i2) { + // IBM JVM 1.4.2 cannot run the following line: + // newcode[j++] = code[i0++]; + // see JIRA JASSIST-74. + newcode[j++] = 0; i0++; + } int defaultbyte = newOffset(i, ByteArray.read32bit(code, i2), where, gapLength, exclusive); @@ -745,8 +749,12 @@ public class CodeIterator implements Opcode { int i0 = i; int i2 = (i & ~3) + 4; // 0-3 byte padding - while (i0 < i2) - newcode[j++] = code[i0++]; + while (i0 < i2) { + // IBM JVM 1.4.2 cannot run the following line: + // newcode[j++] = code[i0++]; + // see JIRA JASSIST-74. + newcode[j++] = 0; i0++; + } int defaultbyte = newOffset(i, ByteArray.read32bit(code, i2), where, gapLength, exclusive); |