Skip to content

Commit 1627836

Browse files
committed
Polyglot version check in HotSpotTruffleRuntimeAccess still accepts JDK-21.
1 parent f2a0e10 commit 1627836

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

substratevm/src/com.oracle.svm.truffle/src/com/oracle/svm/truffle/TruffleBaseFeature.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ private static MethodHandle findVersionGetComponent() {
182182
}
183183

184184
private static final String NATIVE_IMAGE_FILELIST_FILE_NAME = "native-image-resources.filelist";
185+
/**
186+
* When modifying the version values defined below, ensure that the corresponding version fields
187+
* in {@code OptimizedTruffleRuntime} are also updated accordingly to maintain consistency.
188+
*/
185189
private static final Version NEXT_POLYGLOT_VERSION_UPDATE = Version.create(29, 1);
186190
private static final int MAX_JDK_VERSION = 29;
187191

truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/OptimizedTruffleRuntime.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,11 @@
168168
public abstract class OptimizedTruffleRuntime implements TruffleRuntime, TruffleCompilerRuntime {
169169

170170
private static final int JAVA_SPECIFICATION_VERSION = Runtime.version().feature();
171-
public static final Version MIN_COMPILER_VERSION = Version.create(23, 1, 2);
172-
public static final int MIN_JDK_VERSION = 21;
171+
/**
172+
* When modifying the version values defined below, ensure that the corresponding version fields
173+
* in {@code TruffleBaseFeature} are also updated accordingly to maintain consistency.
174+
*/
175+
public static final int MIN_JDK_VERSION = 25;
173176
public static final int MAX_JDK_VERSION = 29;
174177
public static final Version NEXT_VERSION_UPDATE = Version.create(29, 1);
175178

truffle/src/com.oracle.truffle.runtime/src/com/oracle/truffle/runtime/hotspot/HotSpotTruffleRuntimeAccess.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
package com.oracle.truffle.runtime.hotspot;
4242

4343
import static com.oracle.truffle.runtime.OptimizedTruffleRuntime.MAX_JDK_VERSION;
44-
import static com.oracle.truffle.runtime.OptimizedTruffleRuntime.MIN_COMPILER_VERSION;
4544
import static com.oracle.truffle.runtime.OptimizedTruffleRuntime.MIN_JDK_VERSION;
4645
import static com.oracle.truffle.runtime.OptimizedTruffleRuntime.NEXT_VERSION_UPDATE;
4746

@@ -169,11 +168,6 @@ protected static TruffleRuntime createRuntime() {
169168
Your Java runtime '%s' with compiler version '%s' is incompatible with polyglot version '%s'.
170169
Update the org.graalvm.polyglot versions to at least '%s' to resolve this.
171170
""", Runtime.version(), compilerVersion, truffleVersion, compilerVersion));
172-
} else if (compilerVersion.compareTo(MIN_COMPILER_VERSION) < 0) {
173-
return new DefaultTruffleRuntime(formatVersionWarningMessage("""
174-
Your Java runtime '%s' with compiler version '%s' is incompatible with polyglot version '%s'.
175-
Update the Java runtime to the latest update release of JDK '%d'.
176-
""", Runtime.version(), compilerVersion, truffleVersion, jdkFeatureVersion));
177171
}
178172
}
179173
} else {

0 commit comments

Comments
 (0)