From 8926c8069ac4778d8ac08f8005894e515ba56da6 Mon Sep 17 00:00:00 2001 From: Gayan Perera Date: Fri, 12 Jul 2024 09:08:28 +0200 Subject: [PATCH] Add support to override JavaCore.latestSupportedJavaVersion for javac --- org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java index 0771b530fc8..c770cb59406 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java @@ -6501,7 +6501,8 @@ public static void setOptions(Hashtable newOptions) { * @return the latest Java version support by Java Model */ public static String latestSupportedJavaVersion() { - return allVersions.get(allVersions.size() - 1); + return System.getProperty(JavaCore.class.getSimpleName() + ".latestSupportedJavaVersion" //$NON-NLS-1$ + , allVersions.get(allVersions.size() - 1)); } /**