diff --git a/jcl/src/java.base/share/classes/java/lang/Class.java b/jcl/src/java.base/share/classes/java/lang/Class.java
index 2175b443b47..78defe34934 100644
--- a/jcl/src/java.base/share/classes/java/lang/Class.java
+++ b/jcl/src/java.base/share/classes/java/lang/Class.java
@@ -5655,11 +5655,11 @@ public boolean isNestmateOf(Class> that) {
/**
* Answers the nest member classes of the receiver's nest host.
*
- * @throws SecurityException if a SecurityManager is present and package access is not allowed
/*[IF JAVA_SPEC_VERSION < 15]
* @throws LinkageError if there is any problem loading or validating a nest member or the nest host
/*[ENDIF]
/*[IF JAVA_SPEC_VERSION < 24]
+ * @throws SecurityException if a SecurityManager is present and package access is not allowed
* @throws SecurityException if a returned class is not the current class, a security manager is enabled,
* the caller's class loader is not the same or an ancestor of that returned class, and the
* checkPackageAccess() denies access
@@ -5924,7 +5924,9 @@ Object getClassData() {
*
* @return array of Class objects if permitted subclasses exist or null if not a sealed class.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if access to any of the classes returned in the array is denied
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @since 16
*/
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 2a140274b0c..88d1493f01b 100644
--- a/jcl/src/java.base/share/classes/java/lang/System.java
+++ b/jcl/src/java.base/share/classes/java/lang/System.java
@@ -900,9 +900,11 @@ private static void initializeSystemProperties(Map mapProperties
*
* @param code the return code.
*
+/*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if the running thread is not allowed to cause the vm to exit.
*
* @see SecurityManager#checkExit
+/*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static void exit(int code) {
RUNTIME.exit(code);
diff --git a/jcl/src/java.management/share/classes/com/ibm/java/lang/management/internal/ThreadMXBeanImpl.java b/jcl/src/java.management/share/classes/com/ibm/java/lang/management/internal/ThreadMXBeanImpl.java
index 34a8e2eaa15..ae659dfbf28 100644
--- a/jcl/src/java.management/share/classes/com/ibm/java/lang/management/internal/ThreadMXBeanImpl.java
+++ b/jcl/src/java.management/share/classes/com/ibm/java/lang/management/internal/ThreadMXBeanImpl.java
@@ -872,7 +872,9 @@ public MethodHandle run() {
* Wrap a ThreadInfoBase object in a ThreadInfo object.
* @param base container for the ThreadInfo data
* @return ThreadInfo object, or null if base is null
+ /*[IF JAVA_SPEC_VERSION < 24]
* @note this must be wrapped in a doPrivileged().
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
private static ThreadInfo makeThreadInfo(ThreadInfoBase base) {
ThreadInfo newThreadInfo = null;
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 ee9843c45a9..c5a79f8754f 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
@@ -28,8 +28,10 @@
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
+/*[IF JAVA_SPEC_VERSION < 24]*/
import java.security.AccessController;
import java.security.PrivilegedAction;
+/*[ENDIF] JAVA_SPEC_VERSION < 24 */
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -37,7 +39,7 @@
* The {@code Cuda} class provides general CUDA utilities.
*/
/*[IF JAVA_SPEC_VERSION >= 24]*/
-@SuppressWarnings({"removal", "restricted"})
+@SuppressWarnings("restricted")
/*[ELSEIF JAVA_SPEC_VERSION >= 17]*/
@SuppressWarnings("removal")
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
@@ -56,11 +58,17 @@ private static final class Cleaner implements Runnable {
static {
instance = new Cleaner();
+ Thread daemon;
+ /*[IF JAVA_SPEC_VERSION >= 24]*/
+ daemon = VM.getVMLangAccess().createThread(instance,
+ "CUDA pinned buffer cleaner", true, false, true, null); //$NON-NLS-1$
+ /*[ELSE] JAVA_SPEC_VERSION >= 24 */
PrivilegedAction createThread = () -> VM.getVMLangAccess().createThread(instance,
"CUDA pinned buffer cleaner", true, false, true, null); //$NON-NLS-1$
// we assert privilege to create the Thread
- Thread daemon = AccessController.doPrivileged(createThread);
+ daemon = AccessController.doPrivileged(createThread);
+ /*[ENDIF] JAVA_SPEC_VERSION >= 24 */
daemon.start();
}
@@ -102,10 +110,14 @@ public void run() {
}
static {
+ /*[IF JAVA_SPEC_VERSION >= 24]*/
+ System.loadLibrary("cuda4j29"); //$NON-NLS-1$
+ /*[ELSE] JAVA_SPEC_VERSION >= 24 */
AccessController.doPrivileged((PrivilegedAction) () -> {
System.loadLibrary("cuda4j29"); //$NON-NLS-1$
return null;
});
+ /*[ENDIF] JAVA_SPEC_VERSION >= 24 */
Method runMethod;
diff --git a/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaDevice.java b/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaDevice.java
index 9b630f2514b..ee9250f3097 100644
--- a/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaDevice.java
+++ b/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaDevice.java
@@ -520,17 +520,21 @@ public boolean canAccessPeer(CudaDevice peerDevice) throws CudaException {
* the peer device
* @throws CudaException
* if a CUDA exception occurs
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread
* does not have permission to disable peer access
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public void disablePeerAccess(CudaDevice peerDevice) throws CudaException {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
@SuppressWarnings("removal")
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkPermission(CudaPermission.DisablePeerAccess);
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
disablePeerAccess(deviceId, peerDevice.deviceId);
}
@@ -542,17 +546,21 @@ public void disablePeerAccess(CudaDevice peerDevice) throws CudaException {
* the peer device
* @throws CudaException
* if a CUDA exception occurs
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread
* does not have permission to enable peer access
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public void enablePeerAccess(CudaDevice peerDevice) throws CudaException {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
@SuppressWarnings("removal")
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkPermission(CudaPermission.EnablePeerAccess);
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
enablePeerAccess(deviceId, peerDevice.deviceId);
}
@@ -733,17 +741,21 @@ public int hashCode() {
* the desired cache configuration
* @throws CudaException
* if a CUDA exception occurs
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread
* does not have permission to set device cache configurations
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public void setCacheConfig(CacheConfig config) throws CudaException {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
@SuppressWarnings("removal")
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkPermission(CudaPermission.SetCacheConfig);
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
setCacheConfig(deviceId, config.nativeValue);
}
@@ -757,17 +769,21 @@ public void setCacheConfig(CacheConfig config) throws CudaException {
* the desired limit value
* @throws CudaException
* if a CUDA exception occurs
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread
* does not have permission to set device limits
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public void setLimit(Limit limit, long value) throws CudaException {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
@SuppressWarnings("removal")
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkPermission(CudaPermission.SetLimit);
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
setLimit(deviceId, limit.nativeValue, value);
}
@@ -779,17 +795,21 @@ public void setLimit(Limit limit, long value) throws CudaException {
* the desired shared memory configuration
* @throws CudaException
* if a CUDA exception occurs
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread does
* not have permission to set device shared memory configurations
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public void setSharedMemConfig(SharedMemConfig config) throws CudaException {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
@SuppressWarnings("removal")
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkPermission(CudaPermission.SetSharedMemConfig);
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
setSharedMemConfig(deviceId, config.nativeValue);
}
diff --git a/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaModule.java b/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaModule.java
index a7feaba04a5..95002d3f179 100644
--- a/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaModule.java
+++ b/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaModule.java
@@ -141,9 +141,11 @@ private static native void unload(int deviceId, long moduleHandle)
* the module image
* @throws CudaException
* if a CUDA exception occurs
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread
* does not have permission to load GPU modules
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public CudaModule(CudaDevice device, byte[] image) throws CudaException {
this(device, image, null);
@@ -161,20 +163,24 @@ public CudaModule(CudaDevice device, byte[] image) throws CudaException {
* the desired options
* @throws CudaException
* if a CUDA exception occurs
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread
* does not have permission to load GPU modules
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public CudaModule(CudaDevice device, byte[] image, CudaJitOptions options)
throws CudaException {
super();
+ /*[IF JAVA_SPEC_VERSION < 24]*/
@SuppressWarnings("removal")
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkPermission(CudaPermission.LoadModule);
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
if (image == null) {
throw new NullPointerException();
@@ -210,9 +216,11 @@ public CudaModule(CudaDevice device, byte[] image, CudaJitOptions options)
* if a CUDA exception occurs
* @throws IOException
* if an I/O error occurs reading {@code input}
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread
* does not have permission to load GPU modules
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public CudaModule(CudaDevice device, InputStream input)
throws CudaException, IOException {
@@ -233,9 +241,11 @@ public CudaModule(CudaDevice device, InputStream input)
* if a CUDA exception occurs
* @throws IOException
* if an I/O error occurs reading {@code input}
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException
* if a security manager exists and the calling thread
* does not have permission to load GPU modules
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public CudaModule(CudaDevice device, InputStream input,
CudaJitOptions options) throws CudaException, IOException {
diff --git a/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaPermission.java b/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaPermission.java
index 2369bf6bf76..36e62024cf2 100644
--- a/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaPermission.java
+++ b/jcl/src/openj9.cuda/share/classes/com/ibm/cuda/CudaPermission.java
@@ -1,4 +1,4 @@
-/*[INCLUDE-IF Sidecar18-SE]*/
+/*[INCLUDE-IF JAVA_SPEC_VERSION >= 8]*/
/*
* Copyright IBM Corp. and others 2014
*
@@ -68,7 +68,14 @@
* See {@link CudaDevice#setLimit(Limit, long)}.
*
*
+ *
+/*[IF JAVA_SPEC_VERSION >= 24]
+ * @deprecated Checking permissions is not supported.
+/*[ENDIF] JAVA_SPEC_VERSION >= 24
*/
+/*[IF JAVA_SPEC_VERSION >= 24]*/
+@Deprecated(since = "24", forRemoval = true)
+/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
public final class CudaPermission extends BasicPermission {
private static final long serialVersionUID = 5769765985242116236L;
diff --git a/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/CUDAManager.java b/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/CUDAManager.java
index 5f62b851bbd..9214e25bb4c 100644
--- a/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/CUDAManager.java
+++ b/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/CUDAManager.java
@@ -24,8 +24,10 @@
import java.io.IOException;
import java.io.InputStream;
+/*[IF JAVA_SPEC_VERSION < 24]*/
import java.security.AccessController;
import java.security.PrivilegedAction;
+/*[ENDIF] JAVA_SPEC_VERSION < 24 */
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
@@ -60,9 +62,13 @@ private static final class Configuration {
private static final int DEFAULT_THRESHOLD = 30000;
private static void loadProperties(Properties properties, String resourceName) throws IOException {
+ /*[IF JAVA_SPEC_VERSION >= 24]*/
+ try (InputStream input = CUDAManager.class.getResourceAsStream(resourceName)) {
+ /*[ELSE] JAVA_SPEC_VERSION >= 24 */
PrivilegedAction action = () -> CUDAManager.class.getResourceAsStream(resourceName);
try (InputStream input = AccessController.doPrivileged(action)) {
+ /*[ENDIF] JAVA_SPEC_VERSION >= 24 */
if (input != null) {
properties.load(input);
}
@@ -311,9 +317,13 @@ public static String getOutputHeader() {
}
static String getProperty(String name) {
+ /*[IF JAVA_SPEC_VERSION >= 24]*/
+ return System.getProperty(name);
+ /*[ELSE] JAVA_SPEC_VERSION >= 24 */
PrivilegedAction action = () -> System.getProperty(name);
return AccessController.doPrivileged(action);
+ /*[ENDIF] JAVA_SPEC_VERSION >= 24 */
}
/**
diff --git a/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/GPUPermission.java b/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/GPUPermission.java
index b26b3114a6c..efd8aab8be2 100644
--- a/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/GPUPermission.java
+++ b/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/GPUPermission.java
@@ -1,4 +1,4 @@
-/*[INCLUDE-IF Sidecar17]*/
+/*[INCLUDE-IF JAVA_SPEC_VERSION >= 8]*/
/*
* Copyright IBM Corp. and others 2016
*
@@ -40,7 +40,14 @@
* See {@link CUDAManager#instance()}.
*
*
+ *
+/*[IF JAVA_SPEC_VERSION >= 24]
+ * @deprecated Checking permissions is not supported.
+/*[ENDIF] JAVA_SPEC_VERSION >= 24
*/
+/*[IF JAVA_SPEC_VERSION >= 24]*/
+@Deprecated(since = "24", forRemoval = true)
+/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
public final class GPUPermission extends BasicPermission {
static final Permission Access = new GPUPermission("access"); //$NON-NLS-1$
diff --git a/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/SortNetwork.java b/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/SortNetwork.java
index cf153da1965..eec7f7c8ac8 100644
--- a/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/SortNetwork.java
+++ b/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/SortNetwork.java
@@ -24,8 +24,10 @@
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+/*[IF JAVA_SPEC_VERSION < 24]*/
import java.security.AccessController;
import java.security.PrivilegedAction;
+/*[ENDIF] JAVA_SPEC_VERSION < 24 */
import java.util.Queue;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
@@ -44,9 +46,9 @@
* This class provides access to a GPU implementation of the bitonic sort
* network.
*/
-/*[IF JAVA_SPEC_VERSION >= 17]*/
+/*[IF (17 <= JAVA_SPEC_VERSION) & (JAVA_SPEC_VERSION < 24)]*/
@SuppressWarnings("removal")
-/*[ENDIF] JAVA_SPEC_VERSION >= 17 */
+/*[ENDIF] (17 <= JAVA_SPEC_VERSION) & (JAVA_SPEC_VERSION < 24) */
final class SortNetwork {
private static final class LoadKey {
@@ -102,11 +104,14 @@ static LoadResult create(LoadKey key) {
ptxBuffer.write(0);
byte[] ptxCode = ptxBuffer.toByteArray();
-
+ /*[IF JAVA_SPEC_VERSION >= 24]*/
+ return load(device, ptxCode);
+ /*[ELSE] JAVA_SPEC_VERSION >= 24 */
PrivilegedAction loader = () -> load(device, ptxCode);
// we assert privilege to load a module
return AccessController.doPrivileged(loader);
+ /*[ENDIF] JAVA_SPEC_VERSION >= 24 */
} catch (CudaException | IOException e) {
return failure(e);
}
@@ -187,12 +192,16 @@ private static final class ShutdownHook implements Runnable {
static {
modules = new ConcurrentLinkedQueue<>();
+ /*[IF JAVA_SPEC_VERSION < 24]*/
AccessController.doPrivileged((PrivilegedAction) () -> {
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
Thread shutdownThread = VM.getVMLangAccess().createThread(new ShutdownHook(),
"GPU sort shutdown helper", true, false, false, ClassLoader.getSystemClassLoader()); //$NON-NLS-1$
Runtime.getRuntime().addShutdownHook(shutdownThread);
+ /*[IF JAVA_SPEC_VERSION < 24]*/
return null;
});
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
}
public static void unloadOnShutdown(CudaModule module) {
diff --git a/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/internal/CudaGPUAssistProvider.java b/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/internal/CudaGPUAssistProvider.java
index f8e73642280..6a1dd730b35 100644
--- a/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/internal/CudaGPUAssistProvider.java
+++ b/jcl/src/openj9.gpu/share/classes/com/ibm/gpu/internal/CudaGPUAssistProvider.java
@@ -22,8 +22,10 @@
*/
package com.ibm.gpu.internal;
+/*[IF JAVA_SPEC_VERSION < 24]*/
import java.security.AccessController;
import java.security.PrivilegedAction;
+/*[ENDIF] JAVA_SPEC_VERSION < 24 */
import com.ibm.gpu.CUDAManager;
import com.ibm.gpu.spi.GPUAssist;
@@ -48,12 +50,17 @@ public CudaGPUAssistProvider() {
}
@Override
- /*[IF JAVA_SPEC_VERSION >= 17]*/
+ /*[IF (17 <= JAVA_SPEC_VERSION) & (JAVA_SPEC_VERSION < 24)]*/
@SuppressWarnings("removal")
- /*[ENDIF] JAVA_SPEC_VERSION >= 17 */
+ /*[ENDIF] (17 <= JAVA_SPEC_VERSION) & (JAVA_SPEC_VERSION < 24) */
public GPUAssist getGPUAssist() {
+ CUDAManager manager;
+ /*[IF JAVA_SPEC_VERSION >= 24]*/
+ manager = CUDAManager.instance();
+ /*[ELSE] JAVA_SPEC_VERSION >= 24 */
PrivilegedAction getInstance = () -> CUDAManager.instance();
- CUDAManager manager = AccessController.doPrivileged(getInstance);
+ manager = AccessController.doPrivileged(getInstance);
+ /*[ENDIF] JAVA_SPEC_VERSION >= 24 */
if (manager.isSortEnabledOnGPU() || manager.isSortEnforcedOnGPU()) {
if (manager.getDeviceCount() > 0) {
diff --git a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/Dump.java b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/Dump.java
index 40be4d14c21..d827e0bc6c7 100644
--- a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/Dump.java
+++ b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/Dump.java
@@ -112,15 +112,21 @@ public class Dump {
* Trigger a java dump. A java dump is in a human-readable format, and
* summarizes the state of the JVM.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* A security manager check will be made only if the system property
* com.ibm.jvm.enableLegacyDumpSecurity is set to "true" in which case
* a check will be made for com.ibm.jvm.DumpPermission
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @throws RuntimeException if the vm does not contain RAS dump support
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static void JavaDump() {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
checkLegacySecurityPermssion();
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
JavaDumpImpl();
}
@@ -128,15 +134,21 @@ public static void JavaDump() {
* Trigger a heap dump. The default heap dump format (a phd file) is not
* human-readable.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* A security manager check will be made only if the system property
* com.ibm.jvm.enableLegacyDumpSecurity is set to "true" in which case
* a check will be made for com.ibm.jvm.DumpPermission
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @throws RuntimeException if the vm does not contain RAS dump support
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static void HeapDump() {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
checkLegacySecurityPermssion();
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
HeapDumpImpl();
}
@@ -145,15 +157,21 @@ public static void HeapDump() {
* file that contains information about the active processes, threads, and
* system memory. System dumps are usually large.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* A security manager check will be made only if the system property
* com.ibm.jvm.enableLegacyDumpSecurity is set to "true" in which case
* a check will be made for com.ibm.jvm.DumpPermission
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @throws RuntimeException if the vm does not contain RAS dump support
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static void SystemDump() {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
checkLegacySecurityPermssion();
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
SystemDumpImpl();
}
@@ -169,21 +187,29 @@ private Dump() {
* and must be processed using the trace formatting tool supplied
* with the OpenJ9 JVM.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* A security manager check will be made only if the system property
* com.ibm.jvm.enableLegacyDumpSecurity is set to "true" in which case
* a check will be made for com.ibm.jvm.DumpPermission
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @throws RuntimeException if the vm does not contain RAS dump support
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static void SnapDump() {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
checkLegacySecurityPermssion();
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
SnapDumpImpl();
}
+ /*[IF JAVA_SPEC_VERSION < 24]*/
private static final DumpPermission DUMP_PERMISSION = new DumpPermission();
private static final ToolDumpPermission TOOL_DUMP_PERMISSION = new ToolDumpPermission();
private static final String LEGACY_DUMP_PERMISSION_PROPERTY = "com.ibm.jvm.enableLegacyDumpSecurity"; //$NON-NLS-1$
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
private static final class DumpOptionsLock {
DumpOptionsLock() {
@@ -215,13 +241,17 @@ private static final class DumpOptionsLock {
* the command line.
*
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @param fileNamePattern the file name to write to, which may be null, empty or include replacement tokens
* @return the file name that the dump was actually written to
* @throws InvalidDumpOptionException if the filename was invalid
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static String javaDumpToFile(String fileNamePattern ) throws InvalidDumpOptionException {
String request = null;
@@ -249,11 +279,15 @@ public static String javaDumpToFile(String fileNamePattern ) throws InvalidDumpO
*
* A string containing the actual file name written to is returned.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @return the file name that the dump was actually written to
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static String javaDumpToFile() {
try {
@@ -288,13 +322,17 @@ public static String javaDumpToFile() {
* the command line.
*
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @param fileNamePattern the file name to write to, which may be null, empty or include replacement tokens
* @return the file name that the dump was actually written to
* @throws InvalidDumpOptionException if the filename was invalid
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static String heapDumpToFile(String fileNamePattern ) throws InvalidDumpOptionException {
String request = null;
@@ -323,11 +361,15 @@ public static String heapDumpToFile(String fileNamePattern ) throws InvalidDumpO
*
* A string containing the actual file name written to is returned.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @return the file name that the dump was actually written to
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static String heapDumpToFile() {
try {
@@ -363,13 +405,17 @@ public static String heapDumpToFile() {
* the command line.
*
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @param fileNamePattern the file name to write to, which may be null, empty or include replacement tokens
* @return the file name that the dump was actually written to
* @throws InvalidDumpOptionException if the filename was invalid
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static String systemDumpToFile(String fileNamePattern) throws InvalidDumpOptionException {
String request = null;
@@ -398,11 +444,15 @@ public static String systemDumpToFile(String fileNamePattern) throws InvalidDump
*
* A string containing the actual file name written to is returned.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @return the file name that the dump was actually written to
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static String systemDumpToFile() {
try {
@@ -438,13 +488,17 @@ public static String systemDumpToFile() {
* the command line.
*
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @param fileNamePattern the file name to write to, which may be null, empty or include replacement tokens
* @return the file name that the dump was actually written to
* @throws InvalidDumpOptionException if the filename was invalid
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static String snapDumpToFile(String fileNamePattern) throws InvalidDumpOptionException {
String request = null;
@@ -473,12 +527,16 @@ public static String snapDumpToFile(String fileNamePattern) throws InvalidDumpOp
*
* A string containing the actual file name written to is returned.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @return the file name that the dump was actually written to
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static String snapDumpToFile() {
try {
@@ -497,6 +555,7 @@ private static void checkForExtraOptions(String fileNamePattern) throws InvalidD
}
}
+ /*[IF JAVA_SPEC_VERSION < 24]*/
private static void checkDumpSecurityPermssion() throws SecurityException {
/* Check the caller has DumpPermission. */
@SuppressWarnings("removal")
@@ -522,6 +581,7 @@ private static void checkLegacySecurityPermssion() throws SecurityException {
checkDumpSecurityPermssion();
}
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
/**
* Trigger a dump with the specified options.
@@ -544,16 +604,20 @@ private static void checkLegacySecurityPermssion() throws SecurityException {
* For these reasons you should always use the file name that is returned from this function
* when looking for the dump rather than the name you supplied.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown. If a "tool" dump is requested an
* additional check for com.ibm.jvm.ToolDumpPermission will also be made.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @param dumpOptions a dump settings string
*
* @return The file name of the dump that was created. The String "-" means the dump was written to stderr.
*
* @throws RuntimeException if the vm does not contain RAS dump support
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to trigger this dump
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
* @throws InvalidDumpOptionException If the dump options are invalid or the dump operation fails
* @throws NullPointerException if dumpSettings is null
*/
@@ -561,17 +625,20 @@ public static String triggerDump(String dumpOptions) throws InvalidDumpOptionExc
if( dumpOptions == null ) {
throw new NullPointerException();
}
+ /*[IF JAVA_SPEC_VERSION < 24]*/
// All the other permissions will be checked in triggerDump(dumpSettings, event);
if (isToolDump(dumpOptions)) {
checkToolSecurityPermssion();
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
return triggerDump(dumpOptions, "triggerDump"); //$NON-NLS-1$
}
private static String triggerDump(String dumpSettings, String event) throws InvalidDumpOptionException {
-
+ /*[IF JAVA_SPEC_VERSION < 24]*/
/* Check the caller is allowed to trigger a dump. */
checkDumpSecurityPermssion();
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
try {
return triggerDumpsImpl(dumpSettings, event);
@@ -593,24 +660,29 @@ private static String triggerDump(String dumpSettings, String event) throws Inva
* exception is thrown rather than this call blocking the calling thread potentially for
* minutes.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown. If a "tool" dump is specified an
* additional check for com.ibm.jvm.ToolDumpPermission will also be made.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @param dumpOptions the options string to set
* @throws InvalidDumpOptionException if the specified option cannot be set or is incorrect
* @throws DumpConfigurationUnavailableException If the dump configuration cannot be changed because a dump is currently in progress
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to change the dump settings
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
* @throws NullPointerException if options is null
*/
public static void setDumpOptions(String dumpOptions) throws InvalidDumpOptionException, DumpConfigurationUnavailableException {
-
+ /*[IF JAVA_SPEC_VERSION < 24]*/
/* Check the caller is allowed to trigger a dump. */
checkDumpSecurityPermssion();
if (isToolDump(dumpOptions)) {
checkToolSecurityPermssion();
}
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
if( dumpOptions == null ) {
throw new NullPointerException();
@@ -638,15 +710,21 @@ public static void setDumpOptions(String dumpOptions) throws InvalidDumpOptionEx
* with the initial -Xdump: omitted. See the -Xdump option
* section on dump agents in the documentation for the OpenJ9 JVM.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to read the dump settings
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
* @return the options strings
*/
public static String[] queryDumpOptions() {
+ /*[IF JAVA_SPEC_VERSION < 24]*/
/* Check the caller is allowed to query dump settings. */
checkDumpSecurityPermssion();
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
String options = queryDumpOptionsImpl();
if( options != null ) {
@@ -670,16 +748,21 @@ public static String[] queryDumpOptions() {
* exception is thrown rather than this call blocking the calling thread potentially for
* minutes.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a security manager exists a permission check for com.ibm.jvm.DumpPermission will be
* made, if this fails a SecurityException will be thrown.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @throws com.ibm.jvm.DumpConfigurationUnavailableException if the dump configuration cannot be changed because a dump is currently in progress
+ /*[IF JAVA_SPEC_VERSION < 24]
* @throws SecurityException if there is a security manager and it doesn't allow the checks required to change the dump settings
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*/
public static void resetDumpOptions() throws DumpConfigurationUnavailableException {
-
+ /*[IF JAVA_SPEC_VERSION < 24]*/
/* Check the caller is allowed to reset dump settings. */
checkDumpSecurityPermssion();
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
/* Synchronised to prevent two Java threads trying to update dump settings at once.
* setDumpOptions is also synchronised in this way.
diff --git a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/DumpPermission.java b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/DumpPermission.java
index adbc0f94ef3..3fe71c5366f 100644
--- a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/DumpPermission.java
+++ b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/DumpPermission.java
@@ -1,4 +1,4 @@
-/*[INCLUDE-IF Sidecar17]*/
+/*[INCLUDE-IF JAVA_SPEC_VERSION >= 8]*/
package com.ibm.jvm;
/*
@@ -37,7 +37,14 @@
* access to dump files produced by com.ibm.jvm.Dump should be considered as having
* access to any information that was within the application at the time the dump
* was taken.
+ *
+/*[IF JAVA_SPEC_VERSION >= 24]
+ * @deprecated Checking permissions is not supported.
+/*[ENDIF] JAVA_SPEC_VERSION >= 24
*/
+/*[IF JAVA_SPEC_VERSION >= 24]*/
+@Deprecated(since = "24", forRemoval = true)
+/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
public class DumpPermission extends BasicPermission {
private static final long serialVersionUID = -7467700398466970030L;
diff --git a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/LogPermission.java b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/LogPermission.java
index 14de8c540a5..6c9f4f99a39 100644
--- a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/LogPermission.java
+++ b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/LogPermission.java
@@ -1,4 +1,4 @@
-/*[INCLUDE-IF Sidecar17]*/
+/*[INCLUDE-IF JAVA_SPEC_VERSION >= 8]*/
package com.ibm.jvm;
/*
@@ -29,7 +29,14 @@
* The permission class for operations on the com.ibm.jvm.Log class.
* Allowing code access to this permission will allow changes to be made
* to system wide log settings.
+ *
+/*[IF JAVA_SPEC_VERSION >= 24]
+ * @deprecated Checking permissions is not supported.
+/*[ENDIF] JAVA_SPEC_VERSION >= 24
*/
+/*[IF JAVA_SPEC_VERSION >= 24]*/
+@Deprecated(since = "24", forRemoval = true)
+/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
public class LogPermission extends BasicPermission {
private static final long serialVersionUID = 6864546600195718020L;
diff --git a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/ToolDumpPermission.java b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/ToolDumpPermission.java
index 8f01e0829e2..9a4b7741dff 100644
--- a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/ToolDumpPermission.java
+++ b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/ToolDumpPermission.java
@@ -1,4 +1,4 @@
-/*[INCLUDE-IF Sidecar17]*/
+/*[INCLUDE-IF JAVA_SPEC_VERSION >= 8]*/
package com.ibm.jvm;
/*
@@ -28,8 +28,15 @@
* The permission class for allowing "tool" dump agents to be run or
* configured via the com.ibm.jvm.Dump class.
* Granting this permission should be considered equivalent to granting
- * permission to call java.lang.Runtime.exec(String)
+ * permission to call java.lang.Runtime.exec(String).
+ *
+/*[IF JAVA_SPEC_VERSION >= 24]
+ * @deprecated Checking permissions is not supported.
+/*[ENDIF] JAVA_SPEC_VERSION >= 24
*/
+/*[IF JAVA_SPEC_VERSION >= 24]*/
+@Deprecated(since = "24", forRemoval = true)
+/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
public class ToolDumpPermission extends BasicPermission {
private static final long serialVersionUID = -1819639790350383056L;
diff --git a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/TracePermission.java b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/TracePermission.java
index 3b089418c54..f5bc7488d50 100644
--- a/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/TracePermission.java
+++ b/jcl/src/openj9.jvm/share/classes/com/ibm/jvm/TracePermission.java
@@ -1,4 +1,4 @@
-/*[INCLUDE-IF Sidecar17]*/
+/*[INCLUDE-IF JAVA_SPEC_VERSION >= 8]*/
package com.ibm.jvm;
/*
@@ -28,8 +28,15 @@
/**
* The permission class for operations on the com.ibm.jvm.Trace class.
* Allowing code access to this permission will allow changes to be made
- * to system wide trace settings
+ * to system wide trace settings.
+ *
+/*[IF JAVA_SPEC_VERSION >= 24]
+ * @deprecated Checking permissions is not supported.
+/*[ENDIF] JAVA_SPEC_VERSION >= 24
*/
+/*[IF JAVA_SPEC_VERSION >= 24]*/
+@Deprecated(since = "24", forRemoval = true)
+/*[ENDIF] JAVA_SPEC_VERSION >= 24 */
public class TracePermission extends BasicPermission {
private static final long serialVersionUID = -5769946009244520469L;
diff --git a/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassAbstractHelper.java b/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassAbstractHelper.java
index 847e814d62b..2de3c0fa34b 100644
--- a/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassAbstractHelper.java
+++ b/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassAbstractHelper.java
@@ -27,8 +27,10 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
+/*[IF JAVA_SPEC_VERSION < 24]*/
import java.security.AccessController;
import java.security.PrivilegedAction;
+/*[ENDIF] JAVA_SPEC_VERSION < 24 */
import com.ibm.oti.util.Msg;
import com.ibm.oti.util.Util;
@@ -175,10 +177,12 @@ boolean validateURL(URL url, boolean checkExists) {
}
if (checkExists) {
final URL urlToCheck = getURLToCheck(url);
+ /*[IF JAVA_SPEC_VERSION < 24]*/
@SuppressWarnings("removal")
Integer fExists = AccessController.doPrivileged(new PrivilegedAction() {
@Override
public Integer run() {
+ /*[ENDIF] JAVA_SPEC_VERSION < 24 */
File f;
try {
f = new File(urlToCheck.toURI());
@@ -198,9 +202,13 @@ public Integer run() {
* If we hit this, revert to using simple string path */
f = new File(urlToCheck.getPath());
}
+ /*[IF JAVA_SPEC_VERSION >= 24]*/
+ Integer fExists = Integer.valueOf((f.exists() ? FILE_EXIST : FILE_NOT_EXIST));
+ /*[ELSE] JAVA_SPEC_VERSION >= 24 */
return Integer.valueOf((f.exists() ? FILE_EXIST : FILE_NOT_EXIST));
}
});
+ /*[ENDIF] JAVA_SPEC_VERSION >= 24 */
if (fExists.intValue() == FILE_NOT_EXIST) {
/*[MSG "K0598", "URL resource {0} does not exist."]*/
printVerboseError(Msg.getString("K0598", url.toString())); //$NON-NLS-1$
diff --git a/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassHelper.java b/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassHelper.java
index 3e2d3cfbde4..8550ad207d0 100644
--- a/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassHelper.java
+++ b/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassHelper.java
@@ -35,9 +35,11 @@ public interface SharedClassHelper extends SharedHelper {
/**
* Applies the sharing filter to the SharedClassHelper.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* If a SecurityManager is installed, this method can only be called
* by an object whose caller ClassLoader has shared
* class "read,write" permissions.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
*
If a SharedClassFilter is already set, it is replaced by the new filter.
*
diff --git a/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassHelperFactory.java b/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassHelperFactory.java
index 551110167d7..71bc370768d 100644
--- a/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassHelperFactory.java
+++ b/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedClassHelperFactory.java
@@ -69,8 +69,10 @@ public interface SharedClassHelperFactory {
*
Returns a SharedClassTokenHelper for a given ClassLoader.
* Creates a new SharedClassTokenHelper if one cannot be found, otherwise returns an existing SharedClassTokenHelper.
* Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.
+ /*[IF JAVA_SPEC_VERSION < 24]
* Returns null if a SecurityManager is installed and there is no
* SharedClassPermission for the ClassLoader specified.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @see SharedClassTokenHelper
*
@@ -95,8 +97,10 @@ public SharedClassTokenHelper getTokenHelper(ClassLoader loader)
* Returns a SharedClassTokenHelper for a given ClassLoader.
* Creates a new SharedClassTokenHelper if one cannot be found, otherwise returns existing SharedClassTokenHelper.
* Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.
+ /*[IF JAVA_SPEC_VERSION < 24]
* Returns null if a SecurityManager is installed and there is no
* SharedClassPermission for the ClassLoader specified.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @see SharedClassTokenHelper
*
@@ -124,8 +128,10 @@ public SharedClassTokenHelper getTokenHelper(ClassLoader loader, SharedClassFilt
* Returns a SharedClassURLHelper for a given ClassLoader.
* Creates a new SharedClassURLHelper if one cannot be found, otherwise returns existing SharedClassURLHelper.
* Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.
+ /*[IF JAVA_SPEC_VERSION < 24]
* Returns null if a SecurityManager is installed and there is no
* SharedClassPermission for the ClassLoader specified.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @see SharedClassURLHelper
*
@@ -152,8 +158,10 @@ public SharedClassURLHelper getURLHelper(ClassLoader loader)
* otherwise if the classpath specified matches the classpath of an existing helper, returns existing SharedClassURLClasspathHelper.
* Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper, or
* if the ClassLoader has a SharedClassURLClasspathHelper with a different classpath.
+ /*[IF JAVA_SPEC_VERSION < 24]
* Returns null if a SecurityManager is installed and there is no
* SharedClassPermission for the ClassLoader specified.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @see SharedClassURLClasspathHelper
*
@@ -182,8 +190,10 @@ public SharedClassURLHelper getURLHelper(ClassLoader loader)
* If a new SharedClassHelper is created, the specified SharedClassURLFilter is applied to it. If the filter argument is null, no filter is applied.
* Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper OR
* if the ClassLoader has a SharedClassURLClasspathHelper with a different classpath.
+ /*[IF JAVA_SPEC_VERSION < 24]
* Returns null if a SecurityManager is installed and there is no
* SharedClassPermission for the ClassLoader specified.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @see SharedClassURLClasspathHelper
* @see SharedClassFilter
@@ -214,8 +224,10 @@ public SharedClassURLHelper getURLHelper(ClassLoader loader)
* Creates a new SharedClassURLHelper if one cannot be found, otherwise returns existing SharedClassURLHelper.
* If a new SharedClassHelper is created, the specified SharedClassURLFilter is applied to it. If the filter argument is null, no filter is applied.
* Throws a HelperAlreadyDefinedException if the ClassLoader already has a different type of helper.
+ /*[IF JAVA_SPEC_VERSION < 24]
* Returns null if a SecurityManager is installed and there is no
* SharedClassPermission for the ClassLoader specified.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @see SharedClassURLHelper
* @see SharedClassFilter
diff --git a/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedDataHelperFactory.java b/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedDataHelperFactory.java
index bcb1158a464..91835a19549 100644
--- a/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedDataHelperFactory.java
+++ b/jcl/src/openj9.sharedclasses/share/classes/com/ibm/oti/shared/SharedDataHelperFactory.java
@@ -36,8 +36,10 @@ public interface SharedDataHelperFactory {
* if a SharedDataHelper already exists for the ClassLoader, the
* existing Helper is returned.
*
+ /*[IF JAVA_SPEC_VERSION < 24]
* Returns null if a SecurityManager is installed and there is no
* SharedClassPermission for the ClassLoader specified.
+ /*[ENDIF] JAVA_SPEC_VERSION < 24
*
* @see SharedDataHelper
*