Skip to content

Commit

Permalink
Fixes "MockClassLoader cannot access jdk/internal/reflect superclass"
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzkocer committed Feb 1, 2022
1 parent cc62a7e commit c1a89c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/java/com/tumblr/permissme/PermissMeTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.mockito.ArgumentCaptor;
import org.mockito.Matchers;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;

Expand All @@ -26,6 +27,7 @@
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({PermissMeUtils.class, PermissMe.class})
@PowerMockIgnore("jdk.internal.reflect.*")
public class PermissMeTests {

private PermissMe mPermissMe;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.mockito.BDDMockito;
import org.mockito.Mockito;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;

Expand All @@ -27,6 +28,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest(PermissionChecker.class)
@SuppressWarnings("ConstantConditions")
@PowerMockIgnore("jdk.internal.reflect.*")
public class PermissMeUtilsTest {

private final Context mockContext;
Expand Down

0 comments on commit c1a89c3

Please sign in to comment.