summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2008-03-18 21:36:06 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2008-03-18 21:36:06 +0000
commit9df30cbc01a3402cf561ebeecd144037e1da269b (patch)
tree9fb886ca63150fd52ebb2a3b21c2e4a1638faf21
parenta7df6cdbf06c52b47bb6c80fde249a04fe9f4cf6 (diff)
downloadjavassist-9df30cbc01a3402cf561ebeecd144037e1da269b.tar.gz
javassist-9df30cbc01a3402cf561ebeecd144037e1da269b.zip
fixed a bug of CodeIterator.insertGap() with JDK 1.6
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@426 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r--.classpath1
-rw-r--r--Readme.html5
-rw-r--r--src/main/javassist/bytecode/StackMapTable.java3
-rw-r--r--src/test/test/Test.java12
4 files changed, 12 insertions, 9 deletions
diff --git a/.classpath b/.classpath
index 7b2fabb0..deae2f47 100644
--- a/.classpath
+++ b/.classpath
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="javassist/util/HotSwapper.java" kind="src" path="src/main"/>
+ <classpathentry kind="src" path="src/test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
diff --git a/Readme.html b/Readme.html
index 6827b03d..84d606ae 100644
--- a/Readme.html
+++ b/Readme.html
@@ -281,6 +281,11 @@ see javassist.Dump.
<h2>Changes</h2>
+<p>-version 3.7.2
+<ul>
+ <li>JASSIST-51 was fixed.
+</ul>
+
<p>-version 3.7.1 on March 10, 2008
<ul>
<li>a bug of javassist.util.proxy has been fixed.
diff --git a/src/main/javassist/bytecode/StackMapTable.java b/src/main/javassist/bytecode/StackMapTable.java
index 0d45cbef..e3e340b9 100644
--- a/src/main/javassist/bytecode/StackMapTable.java
+++ b/src/main/javassist/bytecode/StackMapTable.java
@@ -229,6 +229,7 @@ public class StackMapTable extends AttributeInfo {
public void sameFrame(int pos, int offsetDelta) throws BadBytecode {}
private int sameLocals(int pos, int type) throws BadBytecode {
+ int top = pos;
int offset;
if (type < 128)
offset = type - 64;
@@ -244,7 +245,7 @@ public class StackMapTable extends AttributeInfo {
pos += 2;
}
- sameLocals(pos, offset, tag, data);
+ sameLocals(top, offset, tag, data);
return pos + 2;
}
diff --git a/src/test/test/Test.java b/src/test/test/Test.java
index 29a08a69..6d34165c 100644
--- a/src/test/test/Test.java
+++ b/src/test/test/Test.java
@@ -1,14 +1,10 @@
package test;
-import javassist.bytecode.*;
+import javassist.*;
public class Test {
- public static void main(String[] args) {
- String[] names = Mnemonic.OPCODE;
- for (int i = 0; i < names.length; i++)
- if (names[i] == null)
- System.out.println(" case " + i + " :");
- else
- System.out.println(" case Opcode." + names[i].toUpperCase() + " :");
+ public static void main(String[] args) throws Exception {
+ CtClass ctClass = ClassPool.getDefault().get("JavassistTarget");
+ ctClass.getMethod("method", "(Ljava/lang/String;)V").insertAfter("");
}
}