# Quality Outreach Heads-up - JDK 28: Value Classes

DevFeed: [Quality Outreach Heads-up - JDK 28: Value Classes](<https://devfeed.tech/articles/quality-outreach-heads-up-jdk-28-value-classes-101890.md>)

Original publisher: [Read original article](<https://inside.java/2026/10/27/quality-heads-up/>)

Author: Nicolai Parlog

Published: 2026-10-27T00:00:00Z

Content type: article

Language: en

Sources: [Inside Java](<https://devfeed.tech/sources/inside-java.md>)

Topics: [JEP-401](<https://devfeed.tech/topics/jep-401.md>), [openjdk](<https://devfeed.tech/topics/openjdk.md>), [Project Valhalla](<https://devfeed.tech/topics/project-valhalla.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [boolean](<https://devfeed.tech/tags/boolean.md>), [build](<https://devfeed.tech/tags/build.md>), [builds](<https://devfeed.tech/tags/builds.md>), [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [continuous-integration](<https://devfeed.tech/tags/continuous-integration.md>), [fields](<https://devfeed.tech/tags/fields.md>), [heads-up](<https://devfeed.tech/tags/heads-up.md>), [jdk](<https://devfeed.tech/tags/jdk.md>), [jdk-28](<https://devfeed.tech/tags/jdk-28.md>), [outreach](<https://devfeed.tech/tags/outreach.md>), [project-valhalla](<https://devfeed.tech/tags/project-valhalla.md>), [projects](<https://devfeed.tech/tags/projects.md>), [quality](<https://devfeed.tech/tags/quality.md>), [this](<https://devfeed.tech/tags/this.md>), [value](<https://devfeed.tech/tags/value.md>)

## AI overview

JEP 401 makes value classes a preview feature in JDK 28, so the Quality Outreach update recommends building and testing projects with previews both disabled and enabled when CI permits. With previews enabled at runtime, 30 existing JDK classes--including primitive wrappers, `Optional` types, and date/time classes--become value classes even for code compiled without previews or on earlier JDKs. Their lack of identity can change `==` results; they cannot be used with monitors, `java.lang.ref` APIs, or `WeakHashMap`, and reflective mutation of their fields fails. These changes may require code adaptations; unexpected JDK misbehavior should be reported to `valhalla-dev`. Enabling previews during JDK 28 compilation also applies early-construction rules to record constructors, potentially causing compile errors when constructor code interacts with `this` before assigning fields and calling `super()` or `this(...)`. The excerpt suggests removing or refactoring such code, or moving it after that call.

## Source excerpt

This Heads-Up is part of the regular communication sent to the projects involved; it covers the introduction of value classes and strict fields