Skip to content
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

mockito-scala does not work with mockito 4.8.0 and above #480

Closed
bursauxa opened this issue Dec 14, 2022 · 1 comment
Closed

mockito-scala does not work with mockito 4.8.0 and above #480

bursauxa opened this issue Dec 14, 2022 · 1 comment

Comments

@bursauxa
Copy link

bursauxa commented Dec 14, 2022

Hello,

We are using mockito-scala 1.17.12. When upgrading to Mockito 4.8.0 or above, tests break with the following:

java.lang.NoClassDefFoundError: org/mockito/internal/debugging/LocationImpl
     at org.mockito.stubbing.ReturnsSmartNulls$ThrowsSmartNullPointer$.apply$default$2(ReturnsSmartNulls.scala:25)
     at org.mockito.stubbing.ReturnsSmartNulls$.$anonfun$apply$1(ReturnsSmartNulls.scala:20)
     at scala.Option.orElse(Option.scala:477)

This is likely related to mockito/mockito#2723 from the 4.8.0 release.

We found out because one of our projects has a direct dependency on mockito-inline (drop-in replacement for mockito-core), so in that project mockito gets version bumps independently from mockito-scala. I assume this is not a typical setup.

@lesiak
Copy link

lesiak commented Mar 21, 2023

Fixed by #474

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants