Index: apache-tomcat-10.1.14-src/java/org/apache/jasper/compiler/JDTCompiler.java =================================================================== --- apache-tomcat-10.1.14-src.orig/java/org/apache/jasper/compiler/JDTCompiler.java +++ apache-tomcat-10.1.14-src/java/org/apache/jasper/compiler/JDTCompiler.java @@ -310,13 +310,13 @@ public class JDTCompiler extends org.apa } else if(opt.equals("15")) { settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_15); } else if(opt.equals("16")) { - settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16); + settings.put(CompilerOptions.OPTION_Source, "16"); } else if(opt.equals("17")) { - settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17); + settings.put(CompilerOptions.OPTION_Source, "17"); } else if(opt.equals("18")) { - settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_18); + settings.put(CompilerOptions.OPTION_Source, "18"); } else if (opt.equals("19")) { - settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_19); + settings.put(CompilerOptions.OPTION_Source, "19"); } else if (opt.equals("20")) { // Constant not available in latest ECJ version shipped with // Tomcat. May be supported in a snapshot build. @@ -383,17 +383,17 @@ public class JDTCompiler extends org.apa settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_15); settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_15); } else if(opt.equals("16")) { - settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16); - settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16); + settings.put(CompilerOptions.OPTION_TargetPlatform, "16"); + settings.put(CompilerOptions.OPTION_Compliance, "16"); } else if(opt.equals("17")) { - settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17); - settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17); + settings.put(CompilerOptions.OPTION_TargetPlatform, "17"); + settings.put(CompilerOptions.OPTION_Compliance, "17"); } else if(opt.equals("18")) { - settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_18); - settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_18); + settings.put(CompilerOptions.OPTION_TargetPlatform, "18"); + settings.put(CompilerOptions.OPTION_Compliance, "18"); } else if (opt.equals("19")) { - settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_19); - settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_19); + settings.put(CompilerOptions.OPTION_TargetPlatform, "19"); + settings.put(CompilerOptions.OPTION_Compliance, "19"); } else if (opt.equals("20")) { // Constant not available in latest ECJ version shipped with // Tomcat. May be supported in a snapshot build.