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
The following commit(s) were added to refs/heads/main by this push: new c817dab6ac Use available constant c817dab6ac is described below commit c817dab6ac23eae368ef1e666d2ef28caffecd5a 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 | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java index c2488328d3..9793ca4080 100644 --- a/java/org/apache/jasper/compiler/JDTCompiler.java +++ b/java/org/apache/jasper/compiler/JDTCompiler.java @@ -290,11 +290,7 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { case "20" -> settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_20); case "21" -> settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_21); case "22" -> settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_22); - case "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"); + case "23" -> settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_23); case "24" -> // Constant not available in latest ECJ version shipped with // Tomcat. May be supported in a snapshot build. @@ -393,11 +389,8 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_22); } case "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); } case "24" -> { // Constant not available in latest ECJ version shipped with --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org