Skip to content
Prev Previous commit
Next Next commit
Merge branch 'main' into dynamic-attach-warning
# Conflicts:
#	mockito-core/src/main/java/org/mockito/internal/PremainAttachAccess.java
  • Loading branch information
raphw committed Dec 16, 2024
commit d61d9e39ad0709ad08afe82f7efa21ad304dd8d8
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,15 @@ public static Instrumentation getInstrumentation() {
.noneMatch(
argument -> argument.contains("-XX:+EnableDynamicAgentLoading"))) {
// Cannot use `Plugins.getMockitoLogger().warn(...)` at this time due to a
// circular
// dependency on `Plugins.registry`.
// circular dependency on `Plugins.registry`.
// The `PluginRegistry` is not yet fully initialized (in `Plugins`), because it
// is
// currently initializing the `MockMaker` which is a InlineByteBuddyMockMaker,
// and
// it is later calling this method to access the instrumentation.
// is currently initializing the `MockMaker` which is a
// InlineByteBuddyMockMaker, and it is later calling this
// method to access the instrumentation.
System.err.println(
"Mockito is currently self-attaching to enable the inline-mock-maker. This "
+ "will no longer work in future releases of the JDK. Please add Mockito as an agent to your "
+ "build what is described in Mockito's documentation: "
+ "build as described in Mockito's documentation: "
+ "https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3");
}
}
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.