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.27k stars 721 forks source link

functionality tests fail to compile on jdk21+ #19127

Open pshipton opened 6 months ago

pshipton commented 6 months ago

Due to https://github.com/eclipse-openj9/openj9/pull/18532

getTotalPhysicalMemory() was deprecated and removed in jdk19, replaced by getTotalMemorySize() from jdk14.

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.functional_aarch64_linux_Nightly_testList_0/28

23:24:13      [javac] /home/jenkins/workspace/Test_openjdk22_j9_sanity.functional_aarch64_linux_Nightly_testList_0/aqa-tests/functional/cmdLineTests/criu/src/org/openj9/criu/SoftmxTest.java:83: error: cannot find symbol
23:24:13      [javac]           long memorySize = ((com.ibm.lang.management.OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemory();
23:24:13      [javac]                                                                                                                           ^
23:24:13      [javac]   symbol:   method getTotalPhysicalMemory()
23:24:13      [javac]   location: interface OperatingSystemMXBean
pshipton commented 6 months ago

@amicic fyi

amicic commented 6 months ago

feel free to revert

pshipton commented 6 months ago

feel free to revert

Done