Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01B38FGKKam5SCGgwgduVAh3
4.7 KiB
14. The 21 to 25 lane: every claim in the hub posts, checked
Prev: 13. Upgrade checklist · Back to the README
The two Java version guides on ankurm.com (features, upgrade guide)
make about twenty checkable claims. scripts/lanes.sh checks each one on JDK 21, 25, 26 and 27, plus 23 and 24 (from the amazoncorretto:23 and :24
images) where the question is when something changed. The verdicts are below; the transcripts are the proof.
| Claim | Verdict | Where it changed | Transcript |
|---|---|---|---|
Records, pattern-matching switch, virtual threads, sequenced collections from the article run unchanged on 21, 25, 26, 27 |
true | final in 21 | 80 |
| Scoped values are final in 25 | true | preview in 21, final in 25 (JEP 506) | 81 |
| Structured concurrency is final in 25 | false: still preview | 5th preview in 25, 6th in 26, 7th in 27; --enable-preview is required on all three |
82 |
Joiner.anySuccessfulResultOrThrow() (the article's code) works on 26 and 27 |
false: renamed | anySuccessfulOrThrow() from 26; allSuccessfulOrThrow() returns a List instead of a Stream from 26; a third type parameter arrives in 27 |
82, 89 |
| Finalization is removed by default | false: still on | finalize() still runs on 21, 25, 26 and 27 unless you pass --finalization=disabled |
83 |
System.setSecurityManager() throws UnsupportedOperationException |
true | already on 21 by default; permanent from 24 (JEP 486) | 84 |
Thread.stop, suspend and resume are removed |
half true | suspend/resume compile on 21 and do not compile on 23, 24, 25 or 26; stop() still compiles on 25 and throws; removed in 26 |
85, 73 |
sun.misc.Unsafe memory methods warn |
true from 24 | none on 21, warning on 24 and 25 (JEP 498) | 86 |
| JNI use warns by default | true from 24 | none on 21, warning on 24 and 25 (JEP 472) | 86 |
Virtual threads pin their carrier inside synchronized on "Java 21 to 24" |
false: 21 to 23 | pinned on 21 and 23, not pinned on 24, 25, 26, 27 (JEP 491) | 87 |
| "Java 25 ships an improved generational ZGC mode" | misleading | generational is the only ZGC from 24; -XX:-ZGenerational is ignored with a warning on 24 and 25 and rejected on 26 and 27 |
88 |
Reflection writing to a final field warns from 26 |
true | silent on 25, warns on 26 and 27 (JEP 500) | 70, 91 |
| Unnamed patterns and unnamed classes are final in 25 | half true | the underscore was final in 22 (JEP 456); compact source files with instance main() (JEP 512) are final in 25 |
90 |
Build-file claims (--release, Gradle, Lombok, Mockito, annotation processing, jdeps) are checked in chapter 15.
Claims about other projects came from their own pages, read on 2026-09-21, not from a run:
| Claim | Verdict | Source |
|---|---|---|
| Spring Boot 3.4 is the first with official Java 25 support | false | Spring Boot 3.4.x is documented up to Java 24, 3.5.x up to Java 25, 4.1.1 up to Java 26 (system requirements); 27 is not listed yet |
| Lombok 1.18.34 or later works on Java 25 | false | JDK 25 support arrived in 1.18.40 (2025-09-04), JDK 26 in 1.18.46, JDK 27 in 1.18.48 (changelog); a run confirms 1.18.34 fails on 25 (95, chapter 15) |
| Mockito 5.12 or later is enough for Java 25 | false (run) | 5.12.0 and 5.17.0 cannot mock an interface on 25 or 27; 5.18.0 is the first that can (97, chapter 15) |
| Hibernate 7 requires Jakarta EE 10 | false | Hibernate ORM 7.0 requires Jakarta Persistence 3.2 (Jakarta EE 11) (release page) |
The next chapter is 15, the build-file half; 12 carries the lane table forward to 29.
prompts/ holds the thirteen AI prompts from the two posts, one per file, corrected to match this chapter.