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:02 UTC

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

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