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

JDK24 adds JavaLangAccess.virtualThreadDelayedTaskSchedulers() #20745

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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