Runnable sources, broken examples and captured transcripts for the ankurm.com JEP 513 article, including the JDK 25 vs 27 compiler wording differences. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TF9JWFvJSNm6HVzswzZU5a
jep513 — Flexible Constructor Bodies (JEP 513, final in Java 25)
Companion code for the ankurm.com article Flexible Constructor Bodies in Java 25 (JEP 513): Validate Before super(). The explanation lives in the article; this folder holds the runnable sources and the transcripts they produced.
JDK25=/path/to/jdk-25 JDK27=/path/to/jdk-27 [JDK21=/path/to/jdk-21] ./run.sh # regenerates output/*.txt
src/ runs; broken/ fails to compile on purpose (the messages are captured in output/03, 07 and 08). Tested on Temurin 25.0.4.1+1 and 27+35;
JDK 21 is used only to show the "before" error.