diff --git a/jcl/src/java.base/share/classes/java/lang/System.java b/jcl/src/java.base/share/classes/java/lang/System.java index 182ea7f2bf5..fec32941613 100644 --- a/jcl/src/java.base/share/classes/java/lang/System.java +++ b/jcl/src/java.base/share/classes/java/lang/System.java @@ -35,6 +35,9 @@ import java.lang.reflect.Method; import java.lang.reflect.Constructor; +/*[IF JAVA_SPEC_VERSION >= 24]*/ +import jdk.internal.javac.Restricted; +/*[ENDIF] JAVA_SPEC_VERSION >= 24 */ /*[IF JAVA_SPEC_VERSION >= 9]*/ import jdk.internal.misc.Unsafe; /*[IF JAVA_SPEC_VERSION > 11]*/ @@ -1107,6 +1110,9 @@ public static int identityHashCode(Object anObject) { * @param pathName the path of the file to be loaded */ @CallerSensitive +/*[IF JAVA_SPEC_VERSION >= 24]*/ +@Restricted +/*[ENDIF] JAVA_SPEC_VERSION >= 24 */ public static void load(String pathName) { @SuppressWarnings("removal") SecurityManager smngr = System.getSecurityManager(); @@ -1138,6 +1144,9 @@ public static void load(String pathName) { * @throws SecurityException if the library was not allowed to be loaded */ @CallerSensitive +/*[IF JAVA_SPEC_VERSION >= 24]*/ +@Restricted +/*[ENDIF] JAVA_SPEC_VERSION >= 24 */ public static void loadLibrary(String libName) { if (libName.indexOf(File.pathSeparator) >= 0) { /*[MSG "K0B01", "Library name must not contain a file path: {0}"]*/ diff --git a/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/Cuda.java b/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/Cuda.java index 3648136bdc1..ee9843c45a9 100644 --- a/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/Cuda.java +++ b/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/Cuda.java @@ -36,9 +36,11 @@ /** * The {@code Cuda} class provides general CUDA utilities. */ -/*[IF JAVA_SPEC_VERSION >= 17]*/ +/*[IF JAVA_SPEC_VERSION >= 24]*/ +@SuppressWarnings({"removal", "restricted"}) +/*[ELSEIF JAVA_SPEC_VERSION >= 17]*/ @SuppressWarnings("removal") -/*[ENDIF] JAVA_SPEC_VERSION >= 17 */ +/*[ENDIF] JAVA_SPEC_VERSION >= 24 */ public final class Cuda { private static final class Cleaner implements Runnable {