PowerMock and Java 8 issue: InterfaceMethodrefInfo cannot be cast to MethodrefInfo

前端 未结 4 1753
长情又很酷
长情又很酷 2021-01-04 01:15

I´m having issues while trying to execute a unit test using PowerMock with Mockito. I need PowerMockito to mock an static method.

These are the versions I´m using:

4条回答
  •  孤独总比滥情好
    2021-01-04 01:41

    Yes, that was the problem. PowerMock has a dependency to javassist, so I just had to exclude that transitive dependency in my pom and later include the dependency to the fixed version of javassist. And that worked for me. Thanks!

提交回复
热议问题