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

markt 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 85800a173e Use available constant
85800a173e is described below

commit 85800a173e2eb7b9c9d0c303f4cd221e272d43d6
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Mar 28 11:50:36 2025 +0000

    Use available constant
---
 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 96dfd70558..aaf1975965 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -312,10 +312,7 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
             } else if (opt.equals("22")) {
                 settings.put(CompilerOptions.OPTION_Source, 
CompilerOptions.VERSION_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_Source, "23");
+                settings.put(CompilerOptions.OPTION_Source, 
CompilerOptions.VERSION_23);
             } else if (opt.equals("24")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.
@@ -398,11 +395,8 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_22);
                 settings.put(CompilerOptions.OPTION_Compliance, 
CompilerOptions.VERSION_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");
+                settings.put(CompilerOptions.OPTION_TargetPlatform, 
CompilerOptions.VERSION_23);
+                settings.put(CompilerOptions.OPTION_Compliance, 
CompilerOptions.VERSION_23);
             } else if (opt.equals("24")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.


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

Reply via email to