You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/06/29 14:37:00 UTC

[tomcat] branch main updated (6391070013 -> 440d4b00d1)

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

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


    from 6391070013 Simplify
     new 6aea3680ba Update ECJ to 4.28/3.34.0 (June 2023)
     new 7329c7c67d Use constants available in ECJ 4.28
     new 440d4b00d1 Add support for compiling JSPs targeting Java 22

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.properties.default                         | 12 ++++++------
 java/org/apache/jasper/compiler/JDTCompiler.java | 21 +++++++++++++--------
 res/maven/tomcat-embed-jasper.pom                |  2 +-
 res/maven/tomcat-jasper.pom                      |  2 +-
 webapps/docs/changelog.xml                       | 10 ++++++++++
 5 files changed, 31 insertions(+), 16 deletions(-)


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


[tomcat] 02/03: Use constants available in ECJ 4.28

Posted by ma...@apache.org.
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

commit 7329c7c67d8aa42062cf53bf7f1054cec971239a
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jun 29 15:32:57 2023 +0100

    Use constants available in ECJ 4.28
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java
index 65868661e0..10c0d10bd4 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -318,10 +318,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
             } else if (opt.equals("19")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_19);
             } else if (opt.equals("20")) {
-                // 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, "20");
+                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_20);
             } else if (opt.equals("21")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.
@@ -395,11 +392,8 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_19);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_19);
             } else if (opt.equals("20")) {
-                // 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, "20");
-                settings.put(CompilerOptions.OPTION_Compliance, "20");
+                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_20);
+                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_20);
             } else if (opt.equals("21")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.


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


[tomcat] 01/03: Update ECJ to 4.28/3.34.0 (June 2023)

Posted by ma...@apache.org.
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

commit 6aea3680ba74247ff5f1a37fbe4c8db0a69790a1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jun 29 15:28:51 2023 +0100

    Update ECJ to 4.28/3.34.0 (June 2023)
---
 build.properties.default          | 12 ++++++------
 res/maven/tomcat-embed-jasper.pom |  2 +-
 res/maven/tomcat-jasper.pom       |  2 +-
 webapps/docs/changelog.xml        |  3 +++
 4 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 1be6c04127..b35ea5ef7c 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -123,15 +123,15 @@ 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
 #
-# Checksum is from "SHA512 Checksums for 4.27" link at
-# https://download.eclipse.org/eclipse/downloads/drops4/R-4.27-202303020300/
-# https://download.eclipse.org/eclipse/downloads/drops4/R-4.27-202303020300/checksum/eclipse-4.27-SUMSSHA512
+# Checksum is from "SHA512 Checksums for 4.28" link at
+# https://download.eclipse.org/eclipse/downloads/drops4/R-4.28-202306050440/
+# https://download.eclipse.org/eclipse/downloads/drops4/R-4.28-202306050440/checksum/eclipse-4.28-SUMSSHA512
 #
-jdt.version=4.27
-jdt.release=R-4.27-202303020300
+jdt.version=4.28
+jdt.release=R-4.28-202306050440
 jdt.checksum.enabled=true
 jdt.checksum.algorithm=SHA-512
-jdt.checksum.value=69b57e12aa7f1339fe86fdb82f8fe9a104ff4d5e887448a779059e4f0626c43af0f1539569d9669c3f3add54fce6447e0bdcec93ee52ad25bf9697f7ac59ca7f
+jdt.checksum.value=84a59a52bf7e010a96a38a3ac7a2bc5524b5e3408d90f66c07230cd6c87bc127cd8a2bcfdf66b73c881648bcf1aa4b20d39337f92f84c9767e6816ccedbb35af
 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/res/maven/tomcat-embed-jasper.pom b/res/maven/tomcat-embed-jasper.pom
index 72a85db2a7..d38543e4b5 100644
--- a/res/maven/tomcat-embed-jasper.pom
+++ b/res/maven/tomcat-embed-jasper.pom
@@ -48,7 +48,7 @@
     <dependency>
       <groupId>org.eclipse.jdt</groupId>
       <artifactId>ecj</artifactId>
-      <version>3.33.0</version>
+      <version>3.34.0</version>
     </dependency>
   </dependencies>
 </project>
diff --git a/res/maven/tomcat-jasper.pom b/res/maven/tomcat-jasper.pom
index 264cb80777..86cee1f4a3 100644
--- a/res/maven/tomcat-jasper.pom
+++ b/res/maven/tomcat-jasper.pom
@@ -60,7 +60,7 @@
     <dependency>
       <groupId>org.eclipse.jdt</groupId>
       <artifactId>ecj</artifactId>
-      <version>3.33.0</version>
+      <version>3.34.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.tomcat</groupId>
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ef22482ca0..b5bfbf2f0b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -208,6 +208,9 @@
       <add>
         Improvements to Japanese translations. Contributed by tak7iji. (markt)
       </add>
+      <update>
+        Update to the Eclipse JDT compiler 4.28. (markt)
+      </update>
     </changelog>
   </subsection>
 </section>


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


[tomcat] 03/03: Add support for compiling JSPs targeting Java 22

Posted by ma...@apache.org.
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

commit 440d4b00d13b177f231421a24c129c360d0ab8d3
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jun 29 15:35:18 2023 +0100

    Add support for compiling JSPs targeting Java 22
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 11 +++++++++++
 webapps/docs/changelog.xml                       |  7 +++++++
 2 files changed, 18 insertions(+)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java
index 10c0d10bd4..7b51b5b584 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -324,6 +324,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, "21");
+            } else if (opt.equals("22")) {
+                // 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, "22");
             } else {
                 log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt));
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_11);
@@ -400,6 +405,12 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
                 // This is checked against the actual version below.
                 settings.put(CompilerOptions.OPTION_TargetPlatform, "21");
                 settings.put(CompilerOptions.OPTION_Compliance, "21");
+            } else if (opt.equals("22")) {
+                // 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, "22");
+                settings.put(CompilerOptions.OPTION_Compliance, "22");
             } 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 b5bfbf2f0b..43c1dfa37b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -156,6 +156,13 @@
         of the Jakarta EL API to align with the latest proposals for the Jakarta
         EL 6.0 API. (markt)
       </add>
+      <add>
+        Add support for specifying Java 22 (with the value <code>22</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="WebSocket">


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