Commit ae70bc3
Fix Java 24 runtime compatibility by falling back to Java 21 parser (#6682)
* Fix Java 24 runtime compatibility by falling back to Java 21 parser
Changes parser selection logic to only use Java25Parser on Java 25+
runtime, allowing Java 24 to fall back to Java21Parser.
Background:
- Java25Parser is compiled with Java 25 (class version 69)
- Java 24 runtime only supports up to class version 68
- Java21Parser can successfully parse Java 23 and 24 source code
This change prevents UnsupportedClassVersionError when running
OpenRewrite on Java 24 runtime while maintaining full functionality.
* Update branch of javaee samples to target to 'main'
* Update the Java versions picked & document recommendations
* Revert unrelated change
---------
Co-authored-by: Tim te Beek <tim@moderne.io>1 parent dbfd350 commit ae70bc3
1 file changed
Lines changed: 9 additions & 6 deletions
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
445 | | - | |
446 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
447 | 450 | | |
448 | 451 | | |
449 | 452 | | |
450 | | - | |
| 453 | + | |
451 | 454 | | |
452 | 455 | | |
453 | 456 | | |
454 | | - | |
| 457 | + | |
455 | 458 | | |
456 | 459 | | |
457 | 460 | | |
458 | | - | |
| 461 | + | |
459 | 462 | | |
460 | 463 | | |
461 | 464 | | |
| |||
0 commit comments