Skip to content

Commit e307f32

Browse files
authored
Check only major version for java compatibility (#85886)
This commit adjusts the version check for plugins to only check the Java major version, instead of the entire thing. fixes #85880
1 parent 765dafd commit e307f32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/core/src/main/java/org/elasticsearch/jdk/JarHell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private static void checkManifest(Manifest manifest, Path jar) {
235235
*/
236236
public static void checkJavaVersion(String resource, String targetVersion) {
237237
Version version = Version.parse(targetVersion);
238-
if (Runtime.version().compareTo(version) < 0) {
238+
if (Runtime.version().feature() < version.feature()) {
239239
throw new IllegalStateException(
240240
String.format(Locale.ROOT, "%s requires Java %s:, your system: %s", resource, targetVersion, Runtime.version().toString())
241241
);

0 commit comments

Comments
 (0)