Replies: 1 comment
-
There was a previous discussion about this in #3037 I think the tentative plan is to ask plugins like Surefire to automatically set this flag, as it makes sense that it is only turned on for tests. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was just reading through some of the features that are targeting Java 21, and came across JEP 451: Prepare to Disallow the Dynamic Loading of Agents.
The proposal discusses plans to "prepare for a future release of the JDK that will, by default, disallow the loading of agents into a running JVM."
This made me wonder about Mocktio, as my very limited (and possibly incorrect) understanding of the framework is that the inline mock maker loads a dynamic ByteBuddy JVM agent that is used to dynamically recompile classes in memory during mocking, enabling it to do stuff like mock final classes, constructors, static attributes, etc.
Curious to know if this is correct and this proposal would potentially affect how Mockito is used in the future, or whether it is totally unrelated to this and I am just misunderstanding.
If it did affect ByteBuddy and Mockito, that feels like a pretty big downside to this JEP. I'd assume this would potentially affect instrumentation-based systems like AppDynamics as well. If it were a problem, is there a process Mockito would take to raise this with OpenJDK?
Beta Was this translation helpful? Give feedback.
All reactions