HHH-17145 Don't use net.bytebuddy.experimental on JDK 21
This commit is contained in:
parent
a01795e23a
commit
495eb28698
|
@ -355,15 +355,15 @@ test {
|
||||||
jvmArgs '-XX:+StartAttachListener'
|
jvmArgs '-XX:+StartAttachListener'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable the experimental features of ByteBuddy with JDK 19+
|
// Enable the experimental features of ByteBuddy with JDK 22+
|
||||||
test {
|
test {
|
||||||
// We need to test the *launcher* version,
|
// We need to test the *launcher* version,
|
||||||
// because some tests will use Mockito (and thus Bytebuddy) to mock/spy
|
// because some tests will use Mockito (and thus Bytebuddy) to mock/spy
|
||||||
// classes that are part of the JDK,
|
// classes that are part of the JDK,
|
||||||
// and those classes always have bytecode matching the version of the launcher.
|
// and those classes always have bytecode matching the version of the launcher.
|
||||||
// So for example, when using a JDK19 launcher and compiling tests with --release 17,
|
// So for example, when using a JDK22 launcher and compiling tests with --release 21,
|
||||||
// Bytebuddy will still encounter classes with Java 19 bytecode.
|
// Bytebuddy will still encounter classes with Java 22 bytecode.
|
||||||
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 19 ) {
|
if ( gradle.ext.javaVersions.test.launcher.asInt() >= 22 ) {
|
||||||
logger.warn( "The version of Java bytecode that will be tested is not supported by Bytebuddy by default. " +
|
logger.warn( "The version of Java bytecode that will be tested is not supported by Bytebuddy by default. " +
|
||||||
" Setting 'net.bytebuddy.experimental=true'." )
|
" Setting 'net.bytebuddy.experimental=true'." )
|
||||||
systemProperty 'net.bytebuddy.experimental', true
|
systemProperty 'net.bytebuddy.experimental', true
|
||||||
|
|
Loading…
Reference in New Issue