eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.28k stars 721 forks source link

Java23: Thread.suspend() and Thread.resume(), etc. have been removed #18758

Closed keithc-ca closed 3 months ago

keithc-ca commented 9 months ago

Failure link

Test code no longer compiles against the head stream:

The upstream change

Failure output (captured from console output)

10:27:04      [javac] /home/jenkins/workspace/Test_openjdknext_j9_sanity.functional_aarch64_linux_Personal_testList_0/aqa-tests/functional/Java8andUp/src/org/openj9/test/java/lang/Test_Thread.java:723: error: cannot find symbol
10:27:04      [javac]               ct.suspend();
10:27:04      [javac]                 ^
10:27:04      [javac]   symbol:   method suspend()
10:27:04      [javac]   location: variable ct of type Thread
pshipton commented 9 months ago

@llxia is there somebody who can fix this?

llxia commented 3 months ago

@LongyuZhang could you please take a look? Thanks

keithc-ca commented 3 months ago

I think we may have arrived at the point where it makes sense to use the Java preprocessor on test code as well so the effects of API differences like this can simply be encapsulated like this:

/*[IF JAVA_SPEC_VERSION < 23]*/
// tests that depend upon API removed in Java 23
/*[ENDIF] JAVA_SPEC_VERSION 23 */
pshipton commented 3 months ago

Changes are merged.