Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK18 deprecates getObjectPendingFinalizationCount & runFinalization #14324

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

JasonFengJ9
Copy link
Member

@JasonFengJ9 JasonFengJ9 commented Jan 19, 2022

@Deprecated(forRemoval=true, since="18")
java.lang.System.runFinalization();
@Deprecated(forRemoval=false, since="18")
java.lang.management.MemoryMXBean.getObjectPendingFinalizationCount();

Fixes an internal RTC item 146926.

Related #14049

Signed-off-by: Jason Feng [email protected]

@keithc-ca
Copy link
Contributor

jenkins test sanity alinux64 jdk18

@JasonFengJ9
Copy link
Member Author

Looking at error: warnings found and -Werror specified.

@keithc-ca
Copy link
Contributor

More changes are required to deal with the new annotations, e.g.:

16:09:54  /home/jenkins/workspace/Build_JDK18_aarch64_linux_Personal/build/linux-aarch64-server-release/support/j9jcl/java.management/share/classes/com/ibm/java/lang/management/internal/MemoryMXBeanImpl.java:426: warning: [deprecation] getObjectPendingFinalizationCount() in MemoryMXBean has been deprecated
16:09:54  	public int getObjectPendingFinalizationCount() {
16:09:54  	           ^

@deprecated(forRemoval=true, since="18")
java.lang.System.runFinalization();
@deprecated(forRemoval=false, since="18")
java.lang.management.MemoryMXBean.getObjectPendingFinalizationCount();

Signed-off-by: Jason Feng <[email protected]>
@JasonFengJ9
Copy link
Member Author

@SuppressWarnings("deprecation") is required.

@keithc-ca
Copy link
Contributor

jenkins test sanity alinux64 jdk18

@keithc-ca
Copy link
Contributor

jenkins test sanity zlinux jdk18

@keithc-ca
Copy link
Contributor

jenkins test sanity alinux64 jdk18

@keithc-ca keithc-ca merged commit 5c28e8a into eclipse-openj9:master Jan 20, 2022
@JasonFengJ9 JasonFengJ9 deleted the finalizationannot branch April 4, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants