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


The following commit(s) were added to refs/heads/master by this push:
     new e0ffafa  JDT 4.12 has a constant for Java 12. Use it.
e0ffafa is described below

commit e0ffafab9cc1e988e35b5cef120815340b451ea0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Sep 24 18:55:18 2019 +0100

    JDT 4.12 has a constant for Java 12. Use it.
---
 java/org/apache/jasper/compiler/JDTCompiler.java | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java 
b/java/org/apache/jasper/compiler/JDTCompiler.java
index 33955d4..9b0e0fe 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -325,10 +325,8 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
                 settings.put(CompilerOptions.OPTION_Source,
                              CompilerOptions.VERSION_11);
             } else if(opt.equals("12")) {
-                // 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, "12");
+                settings.put(CompilerOptions.OPTION_Source,
+                             CompilerOptions.VERSION_12);
             } else if(opt.equals("13")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.
@@ -398,11 +396,10 @@ public class JDTCompiler extends 
org.apache.jasper.compiler.Compiler {
                 settings.put(CompilerOptions.OPTION_Compliance,
                         CompilerOptions.VERSION_11);
             } else if(opt.equals("12")) {
-                // 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, "12");
-                settings.put(CompilerOptions.OPTION_Compliance, "12");
+                settings.put(CompilerOptions.OPTION_TargetPlatform,
+                        CompilerOptions.VERSION_12);
+                settings.put(CompilerOptions.OPTION_Compliance,
+                        CompilerOptions.VERSION_12);
             } else if(opt.equals("13")) {
                 // 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