Valhalla Project Merges Into JDK Upstream

Lois Foltan of Oracle confirmed that the implementation of the proposal JEP 401 (“Value Classes and Objects”) will be integrated into the main OpenJDK repository and is scheduled to be included in the JDK 28 release, scheduled for March 2027, as an experimental feature disabled by default.

Key Idea Valhalla Project: “code as a class, works like an int.” The project introduces the concept of Value classes, which allow you to create types that:

  • do not have identity (unlike ordinary objects, two instances with the same fields are considered equal).
  • cannot be synchronized (synchronized causes IdentityException).
  • can be scalarized (decomposed into fields without allocating memory) or aligned in arrays and fields (data is stored tightly and sequentially).

The syntax involves the use of the new keyword “value”:

value class Point {
final int x;
final int y;
Point(int x, int y) { this.x = x; this.y = y; }

In this example, “Point[]” can now store values directly rather than object references.

/Reports, release notes, official announcements.