fix: Pin byte-buddy(-agent) version to 1.14.19 to workaround Mockito issue (#1060)

* fix: Add the net.bytebuddy.experimental=true system property

Workaround to make Mockito tests to pass under Java 21

Signed-off-by: Ryan Prayogo <57620+ryanprayogo@users.noreply.github.com>

* fix: Pin byte-buddy and byte-buddy-agent to a newer version

Signed-off-by: Ryan Prayogo <57620+ryanprayogo@users.noreply.github.com>

* chore: Fix maven warning about deprecated expression

Signed-off-by: Ryan Prayogo <57620+ryanprayogo@users.noreply.github.com>

* chore: Add comments around the Mockito workaround

Signed-off-by: Ryan Prayogo <57620+ryanprayogo@users.noreply.github.com>

* Update pom.xml

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>

---------

Signed-off-by: Ryan Prayogo <57620+ryanprayogo@users.noreply.github.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Co-authored-by: Todd Baert <todd.baert@dynatrace.com>
This commit is contained in:
Ryan Prayogo 2024-08-22 15:56:19 -04:00 committed by GitHub
parent b7ed041eed
commit 32340a3e0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 19 additions and 1 deletions

20
pom.xml
View File

@ -13,7 +13,7 @@
<junit.jupiter.version>5.11.0</junit.jupiter.version>
<!-- exclusion expression for e2e tests -->
<testExclusions>**/e2e/*.java</testExclusions>
<module-name>${groupId}.${artifactId}</module-name>
<module-name>${project.groupId}.${project.artifactId}</module-name>
</properties>
<name>OpenFeature Java SDK</name>
@ -151,6 +151,24 @@
<dependencyManagement>
<dependencies>
<!-- Start mockito workaround -->
<!-- https://github.com/mockito/mockito/issues/3121 -->
<!-- These are transitive dependencies of mockito we are forcing -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.14.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>1.14.19</version>
<scope>test</scope>
</dependency>
<!-- End mockito workaround-->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-bom</artifactId>