[
https://issues.apache.org/jira/browse/KAFKA-18356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mickael Maison resolved KAFKA-18356.
------------------------------------
Fix Version/s: 4.2.0
Resolution: Fixed
> Explicitly setting up instrumentation for inline mocking (Java 21+)
> -------------------------------------------------------------------
>
> Key: KAFKA-18356
> URL: https://issues.apache.org/jira/browse/KAFKA-18356
> Project: Kafka
> Issue Type: Improvement
> Reporter: 黃竣陽
> Assignee: 黃竣陽
> Priority: Major
> Fix For: 4.2.0
>
>
> When I run test in Java 21, I find there are some warning logs, we should
> imporve mokito to resolve these warning logs.
> {code:java}
> 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:
> https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3
> WARNING: A Java agent has been loaded dynamically
> (/Users/ken/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.15.4/58e850dde88f3cf20f41f659440bef33f6c4fe02/byte-buddy-agent-1.15.4.jar)
> WARNING: If a serviceability tool is in use, please run with
> -XX:+EnableDynamicAgentLoading to hide this warning
> WARNING: If a serviceability tool is not in use, please run with
> -Djdk.instrument.traceUsage for more information
> WARNING: Dynamic loading of agents will be disallowed by default in a future
> release {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)