You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm upgrading Mockito in a Java application from 4.9.0 to 5.1.1. We are on JDK 11 (I personally use Temurin 11.0.13).
So, I've a test failing due to a StackOverflow
java.lang.StackOverflowError
at org.mockito.internal.creation.bytebuddy.inject.MockMethodDispatcher.get(MockMethodDispatcher.java:34)
at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:162)
at org.mockito.internal.creation.bytebuddy.MockMethodAdvice$SelfCallInfo.checkSelfCall(MockMethodAdvice.java:368)
at org.mockito.internal.creation.bytebuddy.MockMethodAdvice.isMocked(MockMethodAdvice.java:171)
This happens when we mock a class that extends ThreadLocal. But I verified that it happens also by mocking ThreadLocal as well.
Sounds like a bug, but you are the experts here.
Best regards,
Roberto
The text was updated successfully, but these errors were encountered:
robertotru
pushed a commit
to robertotru/mockito
that referenced
this issue
Feb 8, 2023
Hello Folks,
I'm upgrading Mockito in a Java application from 4.9.0 to 5.1.1. We are on JDK 11 (I personally use Temurin 11.0.13).
So, I've a test failing due to a StackOverflow
This happens when we mock a class that extends
ThreadLocal
. But I verified that it happens also by mockingThreadLocal
as well.Sounds like a bug, but you are the experts here.
Best regards,
Roberto
The text was updated successfully, but these errors were encountered: