Add java28-features module: the JDK 28 JEP list so far, one example per JEP on 28-ea+26, behaviour changes against JDK 27

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
This commit is contained in:
asmhatre
2026-12-03 09:10:29 +05:30
co-authored by Claude Sonnet 5.5
parent c0062ea398
commit d4b8552957
37 changed files with 767 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
# java28-features
Companion module for the ankurm.com article **Java 28 Features: The JDK 28 JEP List So Far (With Examples)**:
https://ankurm.com/java-28-features-jep-list/
One runnable example per JDK 28 JEP that can be run on Linux/x64, plus a set of non-JEP changes that can break an upgrade.
**Snapshot, not a final list.** Built on 2026-12-03, the scheduled day of Rampdown Phase One. At that time
openjdk.org/projects/jdk/28 (last update 2026-12-01) still said "JEPs targeted to JDK 28, so far". GA is scheduled for 2027-03-09.
## Verified with
| Thing | Version |
|---|---|
| JDK 28 early access | `28-ea+26-2195` (jdk.java.net/28), SHA-256 `6f8e6ab917f233ae3a880a6b6cb8a68489fcbce4778f322682b590871304147d` |
| JDK 27 (comparison) | `27.0.1.1+4-22` (jdk.java.net/27) |
| Older keystore readers | JDK `25.0.5.1`, `21.0.13.1` |
| OpenSSL | 3.0.13 |
| Machine | Linux x86_64, 2 vCPU container |
The sandbox sets `_JAVA_OPTIONS=-XX:+UnlockDiagnosticVMOptions -XX:DisableIntrinsic=_base64_encodeBlock,_base64_decodeBlock`
(and a proxy configuration in `JAVA_TOOL_OPTIONS`). Both were left in place; only their "Picked up ..." banner lines are removed from transcripts.
## Run
JDK27=/path/to/jdk-27 JDK28=/path/to/jdk-28-ea ./run.sh
# optional: JDK25=... JDK21=... adds the older-keytool check
## Files and transcripts
| Topic | Source | Transcript |
|---|---|---|
| environment | `run.sh` | `output/00-environment.txt` |
| JEP 401 value objects | `src/ValueClassDemo.java`, `src/IntegerEquality.java` | `output/01-value-classes.txt` |
| JEP 401 record rule under preview | `broken/RecordThis.java` | `output/02-preview-changes-records.txt` |
| JEP 539 strict field initialization | `src/StrictFields.java`, `broken/EarlyConstruction.java` | `output/03-strict-fields.txt` |
| JEP 540 JSON (incubator) | `src/JsonDemo.java` | `output/04-json.txt` |
| JEP 543 structured concurrency | `src/StructuredDemo.java` | `output/05-structured-concurrency.txt` |
| JEP 542 PEM | `src/PemDemo.java` | `output/06-pem.txt` |
| JEP 547 lazy constants (4th preview) | `src/LazyDemo.java` | `output/07-lazy-constants.txt` |
| JEP 548 Vector API (13th incubator) | `src/VectorDemo.java`, `src/Float16Demo.java` | `output/08-vector.txt` |
| JEP 545 / 546 ZGC | `src/HeapProbe.java` | `output/09-zgc.txt` |
| JEP 535 Shenandoah | none: this JDK build does not include Shenandoah | `output/10-shenandoah.txt` |
| JEP 544 AOT code | `src/AotApp.java` | `output/11-aot-code.txt` |
| PKCS #12 default MAC | `run.sh` | `output/12-pkcs12-openssl.txt` |
| other behaviour changes | `behaviour/Behaviour.java` | `output/13-behaviour-changes.txt` |
| javac changes | `behaviour/RawConditional.java`, `behaviour/SwitchGuard.java` | `output/14-javac-changes.txt` |
| the two finalised APIs on JDK 27 | `src/StructuredDemo.java`, `src/PemDemo.java` | `output/15-finals-on-jdk27.txt` |
| JEP 541 macOS/x64 | `src/PlatformCheck.java` (the port itself was not built) | `output/16-platform.txt` |
## Not verified here
- Generational Shenandoah (JEP 535) was not run.
- macOS/x64 `configure` (JEP 541) was not run; the check was read in `make/autoconf/platform.m4` at tag `jdk-28+26`.
- The AOT timings are from a small program on a shared 2 vCPU machine and are noisy (see the min-max ranges).