Bad type on the operand stack in arraylength

耗尽温柔 提交于 2019-12-03 10:25:39

So after working on it for hours, I found the root cause of the problem. In Java 7u65, they made the byte code verifier more strict as a result, the byte code verifier is reading PowerMock byte code and throwing a VerifyError. So ,basically, PowerMock's byte code is not passing the byte code verifier. The only way around is add -XX:-UseSplitVerifier as VM arguments or to switch to Java 6.

In my case, when I remove ruleRecord[1].split(",") and when I implement my own split functionality, the tests work just fine. I guess Powermock messes up the bytecode when we use,for e.g, methods like whenNew(). Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!