This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new f8ea6383c2 Add support for Java 23
f8ea6383c2 is described below
commit f8ea6383c2e9c93f2e2bd748331a55524ac98374
Author: Mark Thomas <[email protected]>
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 2179f3a7e7..e34a911166 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -332,6 +332,11 @@ public class JDTCompiler extends
org.apache.jasper.compiler.Compiler {
// Java 11.
// 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 11.
+ // 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_11);
@@ -417,6 +422,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 shipped with
+ // Tomcat. May be supported in a snapshot build.
+ // 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_11);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b022f03249..f736ed04db 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -174,6 +174,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: [email protected]
For additional commands, e-mail: [email protected]