Hi, I'm trying to add a local variable and then initialize it. The code is pretty simple (define a local variable and use a static get() to assign a value):
method.addLocalVariable(LOCAL_VARIBALE_NAME, TEST_CLASS); method.insertBefore(LOCAL_VARIBALE_NAME + "=" + TEST_CLASS.getName() + ".get();"); But I get the following error: Exception in thread "main" java.lang.VerifyError: (class: org/test/main/AA, method: foo3 signature: ()V) Incompatible argument to function at org.test.main.Main.main(Main.java:24) But if I switch it to: method.insertBefore(LOCAL_VARIBALE_NAME + "=new " + TEST_CLASS.getName() + "();"); It works! Any ideas? Thanks, Guy View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129706#4129706 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129706 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user