[jboss-cvs] javassist SVN: r704 - in trunk: src/main/javassist and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Apr 14 11:58:55 EDT 2013
Author: chiba
Date: 2013-04-14 11:58:54 -0400 (Sun, 14 Apr 2013)
New Revision: 704
Added:
trunk/src/test/test4/Lvtt.java
Modified:
trunk/Readme.html
trunk/javassist.jar
trunk/src/main/javassist/CtBehavior.java
trunk/src/main/javassist/bytecode/CodeAttribute.java
trunk/src/test/javassist/JvstTest4.java
Log:
fixed JASSIST-185
Modified: trunk/Readme.html
===================================================================
--- trunk/Readme.html 2013-04-13 17:27:52 UTC (rev 703)
+++ trunk/Readme.html 2013-04-14 15:58:54 UTC (rev 704)
@@ -7,7 +7,7 @@
<h1>Javassist version 3</h1>
-<h3>Copyright (C) 1999-2012 by Shigeru Chiba, All rights reserved.</h3>
+<h3>Copyright (C) 1999-2013 by Shigeru Chiba, All rights reserved.</h3>
<p><br></p>
@@ -283,7 +283,7 @@
<p>-version 3.18
<ul>
-JIRA JASSIST-183, 184, 189, 162, 186, 190.
+JIRA JASSIST-183, 184, 189, 162, 185, 186, 190.
</ul>
<p>-version 3.17.1 on December 3, 2012
Modified: trunk/javassist.jar
===================================================================
(Binary files differ)
Modified: trunk/src/main/javassist/CtBehavior.java
===================================================================
--- trunk/src/main/javassist/CtBehavior.java 2013-04-13 17:27:52 UTC (rev 703)
+++ trunk/src/main/javassist/CtBehavior.java 2013-04-14 15:58:54 UTC (rev 704)
@@ -656,11 +656,15 @@
ca.insertLocalVar(where, size);
LocalVariableAttribute va
- = (LocalVariableAttribute)
- ca.getAttribute(LocalVariableAttribute.tag);
+ = (LocalVariableAttribute)ca.getAttribute(LocalVariableAttribute.tag);
if (va != null)
va.shiftIndex(where, size);
+ LocalVariableTypeAttribute lvta
+ = (LocalVariableTypeAttribute)ca.getAttribute(LocalVariableTypeAttribute.tag);
+ if (lvta != null)
+ lvta.shiftIndex(where, size);
+
StackMapTable smt = (StackMapTable)ca.getAttribute(StackMapTable.tag);
if (smt != null)
smt.insertLocal(where, StackMapTable.typeTagOf(typeDesc), classInfo);
Modified: trunk/src/main/javassist/bytecode/CodeAttribute.java
===================================================================
--- trunk/src/main/javassist/bytecode/CodeAttribute.java 2013-04-13 17:27:52 UTC (rev 703)
+++ trunk/src/main/javassist/bytecode/CodeAttribute.java 2013-04-14 15:58:54 UTC (rev 704)
@@ -465,6 +465,7 @@
* Changes the index numbers of the local variables
* to append a new parameter.
* This method does not update <code>LocalVariableAttribute</code>,
+ * <code>LocalVariableTypeAttribute</code>,
* <code>StackMapTable</code>, or <code>StackMap</code>.
* These attributes must be explicitly updated.
*
@@ -472,6 +473,7 @@
* @param size the type size of the new parameter (1 or 2).
*
* @see LocalVariableAttribute#shiftIndex(int, int)
+ * @see LocalVariableTypeAttribute#shiftIndex(int, int)
* @see StackMapTable#insertLocal(int, int, int)
* @see StackMap#insertLocal(int, int, int)
*/
Modified: trunk/src/test/javassist/JvstTest4.java
===================================================================
--- trunk/src/test/javassist/JvstTest4.java 2013-04-13 17:27:52 UTC (rev 703)
+++ trunk/src/test/javassist/JvstTest4.java 2013-04-14 15:58:54 UTC (rev 704)
@@ -838,4 +838,12 @@
Object obj = make(cc.getName());
assertEquals(12, invoke(obj, "test1"));
}
+
+ public void testLocalVariableTypeTable() throws Exception {
+ CtClass cc = sloader.get("test4.Lvtt");
+ CtMethod m = cc.getDeclaredMethod("run");
+ m.addParameter(CtClass.intType);
+ cc.writeFile();
+ Object obj = make(cc.getName());
+ }
}
Added: trunk/src/test/test4/Lvtt.java
===================================================================
--- trunk/src/test/test4/Lvtt.java (rev 0)
+++ trunk/src/test/test4/Lvtt.java 2013-04-14 15:58:54 UTC (rev 704)
@@ -0,0 +1,11 @@
+package test4;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class Lvtt {
+ public void run() {
+ List<String> s = new ArrayList<String>();
+ System.out.println(s);
+ }
+}
Property changes on: trunk/src/test/test4/Lvtt.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
More information about the jboss-cvs-commits
mailing list