JEP 401 Value Objects Merged Into OpenJDK, Targeting JDK 28
More than a decade into Project Valhalla, value objects landed in OpenJDK's master branch. Identity-free equality lets the JVM flatten objects into the reference itself.
Java's decade-long value objects project just merged. One benchmark shows a 3x speedup.
JEP 401, Value Objects, merged into the OpenJDK master branch on July 30, 2026, targeting JDK 28. It is a preview feature from Project Valhalla, a JVM redesign effort that has been running since 2014.
What a value object actually changes
A normal Java object has identity: two objects with identical field values are still different objects, and the equality operator checks whether they are the same object in memory. A value object drops that identity. Equality instead compares field values directly, what the JEP calls statewise equivalence. Because the JVM no longer has to track a value object as a distinct thing in memory, it can flatten the object into the reference itself instead of storing a pointer to it.
What that buys in practice
Oracle's own benchmark, cited in the JEP's own writeup, shows roughly a 3x speedup iterating a 50 million element array of value-typed dates, compared to the same array of ordinary objects. The feature is opt in, marked with a new value keyword, and depends on a companion preview feature, JEP 539, Strict Field Initialization.
The scale of the merge
The integration pull request bundled 2,934 commits and 208,011 additions across 1,888 changed files, split into three companion review PRs by domain: language, JVM, and standard library. Seventeen OpenJDK and Oracle committers reviewed it, including lead JEP author Dan Smith and Project Valhalla veteran Maurizio Cimadamore. This is the culmination of work that has been running under Project Valhalla since 2014.
Next step: read the merged PR or Oracle's own deep dive. If runtime performance is a concern in a system you're building, write to us at hello@gattyworks.com.