[jboss-jira] [JBoss JIRA] Resolved: (JASSIST-93) VerifyError with addLocalVariable() and insertAfter()

Shigeru Chiba (JIRA) jira-events at lists.jboss.org
Tue Oct 13 23:45:06 EDT 2009


     [ https://jira.jboss.org/jira/browse/JASSIST-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shigeru Chiba resolved JASSIST-93.
----------------------------------

    Resolution: Rejected


This is not a bug.

> VerifyError with addLocalVariable() and insertAfter()
> -----------------------------------------------------
>
>                 Key: JASSIST-93
>                 URL: https://jira.jboss.org/jira/browse/JASSIST-93
>             Project: Javassist
>          Issue Type: Bug
>         Environment: javassist 3.11 and 3.5
> JDK6
>  
>            Reporter: Joerg Plewe
>            Assignee: Shigeru Chiba
>
> Hi all!
> This is my first post here and I am a javassist newbie. So hopefully my problem can easily be solved.
> From a real usecase, I condensed the following fragment demonstrating my problem:
> Code:
> ClassPool cp = ClassPool.getDefault();
> CtClass cl = cp.getCtClass("jatest.Test");
> CtMethod m = cl.getDeclaredMethod("foo");
> m.addLocalVariable("bar", CtClass.longType);
> m.insertAfter("bar;", true);
> Object o = cl.toClass().newInstance();	
> The class 'Test' is as simple as it can get:
> Code:
> public class Test {
> 	public void foo() {}
> }
> 	
> Running the code delivers a VerifyError which I think it shouldn't:
> Code:
> Exception in thread "main" java.lang.VerifyError: (class: jatest/Test, method: foo signature: ()V) Register pair 1/2 contains 
> wrong type
>         at java.lang.Class.getDeclaredConstructors0(Native Method)
>         at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
>         at java.lang.Class.getConstructor0(Class.java:2699)
>         at java.lang.Class.newInstance0(Class.java:326)
>         at java.lang.Class.newInstance(Class.java:308)
>         at jatest.Main.main(Main.java:27)	

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list