@@ -292,7 +292,7 @@ public void cleanup() {
292292 }
293293
294294 // Source JVM
295- if (ctxt .getOptions ().getCompilerSourceVM () != null ) {
295+ if (ctxt .getOptions ().getCompilerSourceVM () != null ) {
296296 String opt = ctxt .getOptions ().getCompilerSourceVM ();
297297 if (opt .equals ("1.1" )) {
298298 settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_1_1 );
@@ -332,17 +332,23 @@ public void cleanup() {
332332 settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_18 );
333333 } else if (opt .equals ("19" )) {
334334 settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_19 );
335+ } else if (opt .equals ("20" )) {
336+ settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_20 );
337+ } else if (opt .equals ("21" )) {
338+ settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_21 );
339+ } else if (opt .equals ("22" )) {
340+ settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_22 );
335341 } else {
336342 JasperLogger .COMPILER_LOGGER .unknownSourceJvm (opt );
337- settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_11 );
343+ settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_17 );
338344 }
339345 } else {
340- // Default to 11
341- settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_11 );
346+ // Default to 17
347+ settings .put (CompilerOptions .OPTION_Source , CompilerOptions .VERSION_17 );
342348 }
343349
344350 // Target JVM
345- if (ctxt .getOptions ().getCompilerTargetVM () != null ) {
351+ if (ctxt .getOptions ().getCompilerTargetVM () != null ) {
346352 String opt = ctxt .getOptions ().getCompilerTargetVM ();
347353 if (opt .equals ("1.1" )) {
348354 settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_1_1 );
@@ -397,14 +403,23 @@ public void cleanup() {
397403 } else if (opt .equals ("19" )) {
398404 settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_19 );
399405 settings .put (CompilerOptions .OPTION_Compliance , CompilerOptions .VERSION_19 );
406+ } else if (opt .equals ("20" )) {
407+ settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_20 );
408+ settings .put (CompilerOptions .OPTION_Compliance , CompilerOptions .VERSION_20 );
409+ } else if (opt .equals ("21" )) {
410+ settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_21 );
411+ settings .put (CompilerOptions .OPTION_Compliance , CompilerOptions .VERSION_21 );
412+ } else if (opt .equals ("22" )) {
413+ settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_22 );
414+ settings .put (CompilerOptions .OPTION_Compliance , CompilerOptions .VERSION_22 );
400415 } else {
401416 JasperLogger .COMPILER_LOGGER .unknownTargetJvm (opt );
402- settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_11 );
417+ settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_17 );
403418 }
404419 } else {
405- // Default to 11
406- settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_11 );
407- settings .put (CompilerOptions .OPTION_Compliance , CompilerOptions .VERSION_11 );
420+ // Default to 17
421+ settings .put (CompilerOptions .OPTION_TargetPlatform , CompilerOptions .VERSION_17 );
422+ settings .put (CompilerOptions .OPTION_Compliance , CompilerOptions .VERSION_17 );
408423 }
409424
410425 final IProblemFactory problemFactory = new DefaultProblemFactory (Locale .getDefault ());
0 commit comments