Skip to content

make JavaFixture fit for JDK 24 #117

@akutschera

Description

@akutschera

Currently, when trying to run the tests of JavaFixture with OpenJDK 24, some tests fail because ByteBuddy fails with the following message:

Mockito cannot mock this class: class java.lang.reflect.Field.
Can not mock final classes with the following settings :
 - explicit serialization (e.g. withSettings().serializable())
 - extra interfaces (e.g. withSettings().extraInterfaces(...))

You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

so we should upgrade mockito and assertj (which also includes byte-buddy as a transitive dependency) and the build in our pom in a way that will still work with Java 11 (which we use for building our artefacts) and other versions we might use when developing JavaFixture.

More or less the same thing we did when updating for Java 23.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions