File tree Expand file tree Collapse file tree 4 files changed +5
-28
lines changed
tooling/metamodel-generator Expand file tree Collapse file tree 4 files changed +5
-28
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,11 @@ stage('Configure') {
4949 new BuildEnvironment ( testJdkVersion : ' 20' , testJdkLauncherArgs : ' --enable-preview' ),
5050 new BuildEnvironment ( testJdkVersion : ' 21' , testJdkLauncherArgs : ' --enable-preview' ),
5151 new BuildEnvironment ( testJdkVersion : ' 22' , testJdkLauncherArgs : ' --enable-preview' ),
52- new BuildEnvironment ( testJdkVersion : ' 23' , testJdkLauncherArgs : ' --enable-preview' )
52+ // The following JDKs aren't supported by Hibernate ORM out-of-the box yet:
53+ // they require the use of -Dnet.bytebuddy.experimental=true.
54+ // Make sure to remove that argument as soon as possible
55+ // -- generally that requires upgrading bytebuddy after the JDK goes GA.
56+ new BuildEnvironment ( testJdkVersion : ' 23' , testJdkLauncherArgs : ' --enable-preview -Dnet.bytebuddy.experimental=true' )
5357 ];
5458
5559 if ( env. CHANGE_ID ) {
Original file line number Diff line number Diff line change @@ -294,21 +294,6 @@ test {
294294 jvmArgs ' -XX:+StartAttachListener'
295295}
296296
297- // Enable the experimental features of ByteBuddy with JDK 22+
298- test {
299- // We need to test the *launcher* version,
300- // because some tests will use Mockito (and thus Bytebuddy) to mock/spy
301- // classes that are part of the JDK,
302- // and those classes always have bytecode matching the version of the launcher.
303- // So for example, when using a JDK22 launcher and compiling tests with --release 21,
304- // Bytebuddy will still encounter classes with Java 22 bytecode.
305- if ( jdkVersions. test. launcher. asInt() >= 22 ) {
306- logger. warn( " The version of Java bytecode that will be tested is not supported by Bytebuddy by default. " +
307- " Setting 'net.bytebuddy.experimental=true'." )
308- systemProperty ' net.bytebuddy.experimental' , true
309- }
310- }
311-
312297test {
313298 if ( project. findProperty( ' log-test-progress' )?. toString()?. toBoolean() ) {
314299 // Log a statement for each test.
Original file line number Diff line number Diff line change @@ -298,12 +298,6 @@ if ( jdkVersions.test.release.asInt() >= 17 && jdkVersions.explicit ) {
298298 useJUnitPlatform()
299299 testClassesDirs = sourceSets. testJava17. output. classesDirs
300300 classpath = sourceSets. testJava17. runtimeClasspath
301-
302- if ( jdkVersions. test. launcher. asInt() >= 19 ) {
303- logger. warn( " The version of Java bytecode that will be tested is not supported by Byte Buddy by default. " +
304- " Setting 'net.bytebuddy.experimental=true'." )
305- systemProperty ' net.bytebuddy.experimental' , true
306- }
307301 }
308302
309303 testClasses. dependsOn compileTestJava17Java
Original file line number Diff line number Diff line change @@ -61,12 +61,6 @@ if ( jdkVersions.test.release.asInt() >= 17 && jdkVersions.explicit ) {
6161 javaLauncher = javaToolchains. launcherFor {
6262 languageVersion = jdkVersions. test. launcher
6363 }
64-
65- if ( jdkVersions. test. launcher. asInt() >= 19 ) {
66- logger. warn( " The version of Java bytecode that will be tested is not supported by Bytebuddy by default. " +
67- " Setting 'net.bytebuddy.experimental=true'." )
68- systemProperty ' net.bytebuddy.experimental' , true
69- }
7064 }
7165} else {
7266 sourceSets {
You can’t perform that action at this time.
0 commit comments