Skip to content

Commit 65d3313

Browse files
author
Christian Wimmer
committed
[GR-48489] Virtual Threads should not be considered preview in JDK 21.
PullRequest: graal/15492
2 parents 594347e + 9dcc01b commit 65d3313

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/thread/ContinuationsFeature.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828

2929
import org.graalvm.compiler.serviceprovider.JavaVersionUtil;
3030
import org.graalvm.nativeimage.ImageSingletons;
31+
import org.graalvm.nativeimage.Platform;
3132
import org.graalvm.nativeimage.hosted.RuntimeClassInitialization;
33+
import org.graalvm.nativeimage.impl.InternalPlatform;
3234

3335
import com.oracle.svm.core.SubstrateControlFlowIntegrity;
3436
import com.oracle.svm.core.SubstrateOptions;
@@ -47,12 +49,12 @@ public class ContinuationsFeature implements InternalFeature {
4749
@Override
4850
public void afterRegistration(AfterRegistrationAccess access) {
4951
final int firstLoomPreviewVersion = 19;
50-
final int lastLoomPreviewVersion = 21; // JDK-8303683
52+
final int lastLoomPreviewVersion = 20;
5153

5254
boolean supportLoom = false;
5355
if (JavaVersionUtil.JAVA_SPEC >= firstLoomPreviewVersion) {
5456
boolean haveLoom;
55-
if (JavaVersionUtil.JAVA_SPEC > lastLoomPreviewVersion) {
57+
if (JavaVersionUtil.JAVA_SPEC > lastLoomPreviewVersion && Platform.includedIn(InternalPlatform.NATIVE_ONLY.class)) {
5658
haveLoom = true;
5759
} else {
5860
try {

0 commit comments

Comments
 (0)