[jboss-user] [Javassist user questions] - Re: interface weirdness

oppilif do-not-reply at jboss.com
Wed Nov 5 19:11:30 EST 2008


I have had the same problem. I have a class which contains this code:
List x = new ArrayList();
  | x.add(new ArrayList());
and I instrument it with an editor which replaces the call to method add with:
"$_ = ($r)$proceed($1 instanceof java.lang.Object ? $1 : $1);"
When I run the program, the loading of the class generates the error:
Exception in thread "main" java.lang.VerifyError: (class: Test, method: main signature: ([Ljava/lang/String;)V) Inconsistent args_size for opc_invokeinterface
If the type of variable x is "AbstractList" instead of "List", the program runs normally.
I did some experiments and I think the "cond ? ex1 : ex2" expression is the cause of the problem... but why?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187133#4187133

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4187133



More information about the jboss-user mailing list