This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new d27f738616 Add Java 25 support for JSP compilation
d27f738616 is described below

commit d27f73861651a525ef3252c74b2705b52760f2ab
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Mar 28 11:55:31 2025 +0000

    Add Java 25 support for JSP compilation
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 12 ++++++++++++
 webapps/docs/changelog.xml                       |  7 +++++++
 2 files changed, 19 insertions(+)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 9793ca4080..41833b2be0 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -296,6 +296,11 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
                     // Tomcat. May be supported in a snapshot build.
                     // This is checked against the actual version below.
                     settings.put(CompilerOptions.OPTION_Source, "24");
+                case "25" ->
+                    // 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_Source, "25");
                 default -> {
                     
log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt));
                     settings.put(CompilerOptions.OPTION_Source, 
CompilerOptions.VERSION_21);
@@ -399,6 +404,13 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
                     settings.put(CompilerOptions.OPTION_TargetPlatform, "24");
                     settings.put(CompilerOptions.OPTION_Compliance, "24");
                 }
+                case "25" -> {
+                    // 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, "25");
+                    settings.put(CompilerOptions.OPTION_Compliance, "25");
+                }
                 default -> {
                     
log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt));
                     settings.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_21);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e699510817..5dc88eac0e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -260,6 +260,13 @@
         exploded web applications. The <code>compilerClassName</code> to use is
         <code>org.apache.jasper.compiler.JavaCompiler</code>. (remm)
       </add>
+      <add>
+        Add support for specifying Java 25 (with the value <code>25</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="Cluster">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to