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 2020/03/28 15:01:54 UTC
[tomcat] branch master updated: Add Java 14 and 15 support to JSP
compilation when supported by the ECJ
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 1b41fc7 Add Java 14 and 15 support to JSP compilation when supported by the ECJ
1b41fc7 is described below
commit 1b41fc7ad0ec4fde8c31ea1f14a55b067e306144
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Sat Mar 28 15:01:34 2020 +0000
Add Java 14 and 15 support to JSP compilation when supported by the ECJ
---
java/org/apache/jasper/compiler/JDTCompiler.java | 22 ++++++++++++++++++++++
webapps/docs/changelog.xml | 7 +++++++
2 files changed, 29 insertions(+)
diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java
index 9b0e0fe..85b693b 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -332,6 +332,16 @@ 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, "13");
+ } else if(opt.equals("14")) {
+ // 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, "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");
} else {
log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt));
settings.put(CompilerOptions.OPTION_Source,
@@ -406,6 +416,18 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
// This is checked against the actual version below.
settings.put(CompilerOptions.OPTION_TargetPlatform, "13");
settings.put(CompilerOptions.OPTION_Compliance, "13");
+ } else if(opt.equals("14")) {
+ // 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, "14");
+ settings.put(CompilerOptions.OPTION_Compliance, "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");
} else {
log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt));
settings.put(CompilerOptions.OPTION_TargetPlatform,
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index eb6caab..fda7893 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -148,6 +148,13 @@
<update>
Update to the Eclipse JDT compiler 4.15. (markt)
</update>
+ <add>
+ Add support for specifying Java 14 (with the value <code>14</code>) and
+ Java 15 (with the value <code>15</code>) as the compiler source and/or
+ compiler target for JSP compilation. If used with an ECJ version that
+ does not support these values, a warning will be logged and the latest
+ supported version will used. (markt)
+ </add>
</changelog>
</subsection>
<subsection name="Other">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org