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 2021/01/05 17:49:45 UTC

[tomcat] 02/02: Use new constants available in ECJ 4.18

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

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

commit 35ada2b6416b7579eb95438c1d358650f17c9da6
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jan 5 17:49:02 2021 +0000

    Use new constants available in ECJ 4.18
---
 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 4c7d3bd..ebc00f6 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -308,10 +308,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
             } else if(opt.equals("14")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_14);
             } else if(opt.equals("15")) {
-                // 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, "15");
+                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_15);
             } else if(opt.equals("16")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.
@@ -370,11 +367,8 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_14);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_14);
             } else if(opt.equals("15")) {
-                // 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, "15");
-                settings.put(CompilerOptions.OPTION_Compliance, "15");
+                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_15);
+                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_15);
             } else if(opt.equals("16")) {
                 // 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