-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InternalError when using mockito 5.3 with -XX:+AllowEnhancedClassRedefinition #259
Comments
Thanks for reporting this, I filed JBR-6363 in our issue tracker. |
This problem is a bit more difficult. The sample program uses PowerMock, which redefines |
Thank you for your analysis. I was not aware that the sample was using PowerMock explicitly, so I looked at it again. So if the subclass MockMaker is enough for the current project a simple workaround is to add this dependency to the project: <dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-subclass</artifactId>
<scope>test</scope>
</dependency> |
There is a jbr branch with the patch available at: https://github.com/JetBrains/JetBrainsRuntime/tree/vladimir.dvorak/JBR-6363 if you know how to build a JDK, it would be great if you could try it on your case, but don't feel it's necessary |
New release https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr-release-17.0.10b1186.1 support redefinition of |
Hi,
we recently upgraded from Spring Boot 2.7 to Spring Boot 3.1 and with this we also upgraded mockito from 4.5.1 to 5.3.1 and bytebuddy from 1.12.23 to 1.14.10.
We use JBR in our development flow with
-XX:+AllowEnhancedClassRedefinition
to have faster development cycles when working on UI tests so no restart is required.After the upgrade we see exceptions caused by
java.lang.InternalError
in our tests when we use JBR with this flag.I uploaded a minimal reproducer here: https://github.com/schmidti159/reproducer_for-internal_error_in_jbr_with_mockito
The readme also contains the complete stacktrace and steps how to reproduce.
I am using IntelliJ IDEA 2023.2.5 to start the test and could reproduce it with JBR version 17.0.9+7-b1087.3
Could you please have a look? Having enhanced class redefinition is very valuable to our development workflow.
The text was updated successfully, but these errors were encountered: