79615061

Date: 2025-05-10 01:47:29
Score: 1.5
Natty:
Report link

After doing further research, it seems that mockito 5.17.0 uses bytebuddy 1.15.11 that supports up to Java 23

Caused by: java.lang.IllegalArgumentException: Java 24 (68) is not supported by the current version of Byte Buddy which officially supports Java 23 (67) - update Byte Buddy or set net.bytebuddy.experimental as a VM property

bytebuddy only supports Java 25 ( including Java 24 ) from 1.17.5. The current workaround is to configure net.bytebuddy.experimental as suggested by this link also - https://github.com/raphw/byte-buddy/issues/1396

<pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <argLine>-Dnet.bytebuddy.experimental=true -javaagent:${mockito.core.jar} </argLine>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
Reasons:
  • Blacklisted phrase (1): this link
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user20745683