< prev index next >
src/java.base/share/classes/java/lang/Runtime.java
Print this page
*** 33,42 ****
--- 33,44 ----
import java.util.stream.Collectors;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.StringTokenizer;
+
+ import jdk.internal.misc.SharedSecrets;
import jdk.internal.reflect.CallerSensitive;
import jdk.internal.reflect.Reflection;
/**
* Every Java application has a single instance of class
*** 700,712 ****
* The method {@link System#gc()} is the conventional and convenient
* means of invoking this method.
*/
public native void gc();
- /* Wormhole for calling java.lang.ref.Finalizer.runFinalization */
- private static native void runFinalization0();
-
/**
* Runs the finalization methods of any objects pending finalization.
* Calling this method suggests that the Java virtual machine expend
* effort toward running the {@code finalize} methods of objects
* that have been found to be discarded but whose {@code finalize}
--- 702,711 ----
*** 722,732 ****
* and convenient means of invoking this method.
*
* @see java.lang.Object#finalize()
*/
public void runFinalization() {
! runFinalization0();
}
/**
* Not implemented, does nothing.
*
--- 721,731 ----
* and convenient means of invoking this method.
*
* @see java.lang.Object#finalize()
*/
public void runFinalization() {
! SharedSecrets.getJavaLangRefAccess().runFinalization();
}
/**
* Not implemented, does nothing.
*
< prev index next >