[
https://issues.jboss.org/browse/JASSIST-213?page=com.atlassian.jira.plugi...
]
Shigeru Chiba commented on JASSIST-213:
---------------------------------------
Yes, because the internal compiler does not support the syntax of Java 5 or later.
jvmvrfy012 stack shape inconsistent
-----------------------------------
Key: JASSIST-213
URL:
https://issues.jboss.org/browse/JASSIST-213
Project: Javassist
Issue Type: Bug
Affects Versions: 3.16.1-GA
Reporter: Diego Correnti
Assignee: Shigeru Chiba
Priority: Critical
I get jvmvrfy012 stack shape inconsistent from this code:
String method ="public Object evaluate(Object owner){return
owner.toString().length() <= 10;}";
ClassPool pool = ClassPool.getDefault();
CtClass newClass = pool.makeClass("MyExpression");
newClass.setInterfaces(new CtClass[]
{pool.get("magnum.commands.IExpression")});
CtMethod newmethod = CtNewMethod.make(method,newClass);
newClass.addMethod(newmethod);
Class<?> cClass = newClass.toClass();
Object snippet = cClass.newInstance();
public interface IExpression<TypeIn,TypeOut>
{
TypeOut evaluate(TypeIn owner);
}
Caused by: java.lang.VerifyError: JVMVRFY012 forma stack non coerente;
classe=MyExpression, metodo=evaluate(Ljava/lang/Object;)Ljava/lang/Object;, pc=17
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1325)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira