-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersjavaPull requests that update Java codePull requests that update Java code
Description
Some tests that are using Mockito are failing under Java 21 with this error
Cannot call abstract real method on java object!
Calling real methods is only possible when mocking non abstract method.
This seem to be caused by an open issue in Mockito.
There is a workaround available (set the net.bytebuddy.experimental
system property to true
), which can be set in the unit tests' @BeforeAll
annotated method.
Steps to reproduce:
- Use Java 21 (reproducible with Temurin JDK 21.0.4)
- Run
mvn clean test
- Observe failures
toddbaerttoddbaert
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomersjavaPull requests that update Java codePull requests that update Java code