Recently I was upgrading my project from JDK 11 to JDK 17. After upgrading, powermock seems to have an issue. While running AUT's , I am getting following error:
java.lang.RuntimeException: PowerMock internal error: Should never throw exception at this level
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @3fc34119
Do you know any workaround this issue, If so can you please provide the solution.