Skip to content

Commit

Permalink
Merge pull request #20745 from JasonFengJ9/jdk24access
Browse files Browse the repository at this point in the history
JDK24 adds JavaLangAccess.virtualThreadDelayedTaskSchedulers()
  • Loading branch information
keithc-ca authored Dec 4, 2024
2 parents f8939d1 + 1ec0984 commit c568611
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions jcl/src/java.base/share/classes/java/lang/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
import sun.reflect.annotation.AnnotationType;
/*[IF JAVA_SPEC_VERSION >= 24]*/
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import jdk.internal.loader.NativeLibraries;
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

Expand Down Expand Up @@ -864,6 +865,13 @@ public byte stringInitCoder() {
public Executor virtualThreadDefaultScheduler() {
return VirtualThread.defaultScheduler();
}

/*[IF !INLINE-TYPES]*/
@Override
/*[ENDIF] !INLINE-TYPES */
public Stream<ScheduledExecutorService> virtualThreadDelayedTaskSchedulers() {
return VirtualThread.delayedTaskSchedulers();
}
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

/*[ENDIF] JAVA_SPEC_VERSION >= 9 */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import java.util.TreeMap;

import openj9.internal.criu.CRIUSECProvider;
import sun.security.action.GetPropertyAction;
import sun.security.jca.ProviderList;
import sun.security.jca.Providers;

Expand All @@ -48,7 +47,12 @@ public final class CRIUConfigurator {
private static final HashMap<String, String> oldProviders = new HashMap<>();
/** Tracing for CRIUSEC. */
private static final boolean debug = Boolean.parseBoolean(
GetPropertyAction.privilegedGetProperty("enable.j9internal.checkpoint.security.api.debug", "false"));
/*[IF JAVA_SPEC_VERSION < 24]*/
sun.security.action.GetPropertyAction.privilegedGetProperty
/*[ELSE] JAVA_SPEC_VERSION < 24
System.getProperty
/*[ENDIF] JAVA_SPEC_VERSION < 24 */
("enable.j9internal.checkpoint.security.api.debug", "false"));
private static final Map<String, Set<String>> cachedAlgorithms = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
private static boolean isCacheEligible;

Expand Down

0 comments on commit c568611

Please sign in to comment.