
Identifying JDK value class candidates
Dan Smith from the OpenJDK team analyzes which JDK API classes in java.base are candidates for migration to value classes under JEP 401 (Value Objects). Applying a set of criteria (no mutable fields, no synchronized methods, value-candidate superclass, etc.), he categorizes classes into records, concrete stateful/stateless, and abstract stateful/stateless groups. Key findings include 28 already-identified migration targets, 4 good candidates blocked by Serializable (UUID, Currency, KeyPair, ValueRange), and several near-term 'starter kit' additions like Runtime.Version, HexFormat, and java.security.PEM. The post also explains why enums and anonymous classes are excluded from value class consideration — enums gain little from losing identity, and anonymous classes lack syntax for modifiers.