2021-06-08 18:17:56 +00:00
|
|
|
diff --git a/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java b/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java
|
|
|
|
index 187f1ea..f8fa355 100644
|
|
|
|
--- a/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java
|
|
|
|
+++ b/src/main/java/org/mockito/internal/creation/bytebuddy/InlineBytecodeGenerator.java
|
|
|
|
@@ -30,8 +30,8 @@ import net.bytebuddy.dynamic.ClassFileLocator;
|
2020-10-15 17:51:16 +00:00
|
|
|
import net.bytebuddy.dynamic.scaffold.MethodGraph;
|
|
|
|
import net.bytebuddy.dynamic.scaffold.TypeValidation;
|
|
|
|
import net.bytebuddy.implementation.Implementation;
|
|
|
|
-import net.bytebuddy.jar.asm.ClassVisitor;
|
|
|
|
-import net.bytebuddy.jar.asm.MethodVisitor;
|
|
|
|
+import org.objectweb.asm.ClassVisitor;
|
|
|
|
+import org.objectweb.asm.MethodVisitor;
|
|
|
|
import net.bytebuddy.matcher.ElementMatchers;
|
|
|
|
import net.bytebuddy.pool.TypePool;
|
|
|
|
import net.bytebuddy.utility.OpenedClassReader;
|
2021-06-08 18:17:56 +00:00
|
|
|
diff --git a/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java b/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java
|
|
|
|
index f5b807a..c9ca662 100644
|
|
|
|
--- a/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java
|
|
|
|
+++ b/src/test/java/org/mockito/internal/creation/bytebuddy/AbstractByteBuddyMockMakerTest.java
|
2020-10-15 17:51:16 +00:00
|
|
|
@@ -26,6 +26,7 @@ import org.mockito.plugins.MockMaker;
|
|
|
|
import org.mockito.stubbing.Answer;
|
|
|
|
import org.mockitoutil.ClassLoaders;
|
|
|
|
import org.mockitoutil.SimpleSerializationUtil;
|
|
|
|
+import org.objectweb.asm.ClassVisitor;
|
|
|
|
import org.objenesis.ObjenesisStd;
|
|
|
|
|
|
|
|
public abstract class AbstractByteBuddyMockMakerTest<MM extends MockMaker> {
|
2021-06-08 18:17:56 +00:00
|
|
|
@@ -154,7 +155,7 @@ public abstract class AbstractByteBuddyMockMakerTest<MM extends MockMaker> {
|
2020-10-15 17:51:16 +00:00
|
|
|
// given
|
|
|
|
ClassLoader classpath_with_objenesis =
|
|
|
|
ClassLoaders.excludingClassLoader()
|
|
|
|
- .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class)
|
|
|
|
+ .withCodeSourceUrlOf(Mockito.class, ByteBuddy.class, ObjenesisStd.class, ClassVisitor.class)
|
|
|
|
.withCodeSourceUrlOf(coverageTool())
|
|
|
|
.build();
|
|
|
|
|
2021-06-08 18:17:56 +00:00
|
|
|
diff --git a/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java b/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java
|
|
|
|
index f971893..63af9cd 100644
|
|
|
|
--- a/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java
|
|
|
|
+++ b/src/test/java/org/mockito/internal/junit/JUnitRuleTest.java
|
|
|
|
@@ -8,6 +8,7 @@ import static org.junit.Assert.assertTrue;
|
2020-10-15 17:51:16 +00:00
|
|
|
import static org.mockito.Mockito.mockingDetails;
|
|
|
|
import static org.mockito.Mockito.when;
|
|
|
|
|
|
|
|
+import org.junit.Ignore;
|
|
|
|
import org.junit.Rule;
|
|
|
|
import org.junit.Test;
|
|
|
|
import org.mockito.Mock;
|
|
|
|
@@ -42,6 +43,7 @@ public class JUnitRuleTest {
|
|
|
|
|
|
|
|
@SuppressWarnings({"CheckReturnValue", "MockitoUsage"})
|
|
|
|
@Test
|
|
|
|
+ @Ignore
|
|
|
|
public void does_not_check_invalid_mockito_usage_on_failure() throws Throwable {
|
|
|
|
// This intended behavior is questionable
|
|
|
|
// However, it was like that since the beginning of JUnit rule support
|
2021-06-08 18:17:56 +00:00
|
|
|
diff --git a/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java b/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java
|
|
|
|
index 9cd47da..356a3e0 100644
|
|
|
|
--- a/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java
|
|
|
|
+++ b/src/test/java/org/mockitointegration/NoJUnitDependenciesTest.java
|
|
|
|
@@ -16,6 +16,7 @@ import org.junit.Test;
|
|
|
|
import org.mockito.Mockito;
|
|
|
|
import org.mockito.internal.configuration.plugins.Plugins;
|
|
|
|
import org.mockitoutil.ClassLoaders;
|
|
|
|
+import org.objectweb.asm.ClassVisitor;
|
|
|
|
import org.objenesis.Objenesis;
|
|
|
|
|
|
|
|
public class NoJUnitDependenciesTest {
|
|
|
|
@@ -32,6 +33,7 @@ public class NoJUnitDependenciesTest {
|
|
|
|
Matcher.class,
|
|
|
|
ByteBuddy.class,
|
|
|
|
ByteBuddyAgent.class,
|
|
|
|
+ ClassVisitor.class,
|
|
|
|
Objenesis.class)
|
|
|
|
.withCodeSourceUrlOf(coverageTool())
|
|
|
|
.without("junit", "org.junit", "org.opentest4j")
|