(tomcat) branch 11.0.x updated: Update to the Eclipse JDT compiler 4.40

[email protected]
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <[email protected]>
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 4ce662bbe8 Update to the Eclipse JDT compiler 4.40
4ce662bbe8 is described below

commit 4ce662bbe8d4487e89d0869256be8a07cc2fcda9
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jul 1 14:28:02 2026 +0100

    Update to the Eclipse JDT compiler 4.40
---
 build.properties.default                         |  6 +++---
 java/org/apache/jasper/compiler/JDTCompiler.java | 12 +++---------
 webapps/docs/changelog.xml                       |  7 +++++++
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 6843d257b8..c1de917041 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -144,11 +144,11 @@ base-maven.loc=https://repo.maven.apache.org/maven2
 # ----- Eclipse JDT, version 4.7 or later -----#
 # See https://cwiki.apache.org/confluence/display/TOMCAT/Managing+Tomcat%27s+Dependency+on+the+Eclipse+JDT+Core+Batch+Compiler
 #
-jdt.version=4.39
-jdt.release=R-4.39-202602260420
+jdt.version=4.40
+jdt.release=R-4.40-202606010713
 jdt.checksum.enabled=true
 jdt.checksum.algorithm=SHA-512
-jdt.checksum.value=af25493d4a429fd24256f69a085a618afffe23bb09b284976fb9e82f651715a0455b704ee800432b43dd409f74874765089cd65fc148e2175d251f9ef830ce0a
+jdt.checksum.value=0b2c799e20dbdd074272faf2aed454186f0ad25759c09963350bceea8e9bec0ad9a04693115401cab6a1c9122b94aba6d79d741eef2e003a4149b2fe00f6f158
 jdt.home=${base.path}/ecj-${jdt.version}
 jdt.jar=${jdt.home}/ecj-${jdt.version}.jar
 # The download will be moved to the archive area eventually. We are taking care of that in advance.
diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java
index 64ac71e809..4cdd94d00e 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -343,10 +343,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
             } else if (opt.equals("25")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_25);
             } else if (opt.equals("26")) {
-                // 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, "26");
+                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_26);
             } else if (opt.equals("27")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.
@@ -438,11 +435,8 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_25);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_25);
             } else if (opt.equals("26")) {
-                // 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, "26");
-                settings.put(CompilerOptions.OPTION_Compliance, "26");
+                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_26);
+                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_26);
             } else if (opt.equals("27")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f84849ee10..88a60876aa 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -188,6 +188,13 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Other">
+    <changelog>
+      <update>
+        Update to the Eclipse JDT compiler 4.40. (markt)
+      </update>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 11.0.23 (markt)" rtext="2026-06-22">
   <subsection name="Catalina">
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.