PowerMock & Java 11

后端 未结 2 1527
后悔当初
后悔当初 2020-12-17 10:51

We are using PowerMock in few of our historical projects. Unfortunately PowerMock is quite dead and is not compatible with Java 11.

And we are using mockStatic(). Ye

相关标签:
2条回答
  • 2020-12-17 11:21

    If there are a lot of test classes to migrate to Java 11, it is possible to configure the ignores only once in the org/powermock/entensions/configuration.properties file :

    powermock.global-ignore=com.sun.org.apache.xerces.*,javax.xml.*,org.xml.*,org.w3c.*
    
    0 讨论(0)
  • 2020-12-17 11:23

    After one year of no releases, things are really moving in PowerMock.

    PowerMock 2.0.0-RC1 was released. And with PowerMockito 2.0.0-RC1 + @PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "org.w3c.*"})

    The tests work under Java 11.

    0 讨论(0)
提交回复
热议问题