This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push: new 29c214ce03 Add support for Java 23 29c214ce03 is described below commit 29c214ce03a6184e616090c43df27a7938b64eb8 Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Apr 29 09:03:32 2024 +0100 Add support for Java 23 --- java/org/apache/jasper/compiler/JDTCompiler.java | 11 +++++++++++ webapps/docs/changelog.xml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java index c0d2573321..979b552fef 100644 --- a/java/org/apache/jasper/compiler/JDTCompiler.java +++ b/java/org/apache/jasper/compiler/JDTCompiler.java @@ -341,6 +341,11 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { // Java 8. // This is checked against the actual version below. settings.put(CompilerOptions.OPTION_Source, "22"); + } else if (opt.equals("23")) { + // Constant not available in latest ECJ version that runs on + // Java 8. + // This is checked against the actual version below. + settings.put(CompilerOptions.OPTION_Source, "23"); } else { log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt)); settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8); @@ -435,6 +440,12 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { // This is checked against the actual version below. settings.put(CompilerOptions.OPTION_TargetPlatform, "22"); settings.put(CompilerOptions.OPTION_Compliance, "22"); + } else if (opt.equals("23")) { + // Constant not available in latest ECJ version that runs on + // Java 8. + // This is checked against the actual version below. + settings.put(CompilerOptions.OPTION_TargetPlatform, "23"); + settings.put(CompilerOptions.OPTION_Compliance, "23"); } else { log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt)); settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index a944a64d85..dbf0c637a8 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -183,6 +183,17 @@ </fix> </changelog> </subsection> + <subsection name="Jasper"> + <changelog> + <add> + Add support for specifying Java 23 (with the value <code>23</code>) as + the compiler source and/or compiler target for JSP compilation. If used + with an Eclipse JDT compiler version that does not support these values, + a warning will be logged and the default will used. + (markt) + </add> + </changelog> + </subsection> <subsection name="Other"> <changelog> <update> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org