<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/jep-539-strict-field-initialization-in-the-jvm-preview--oulwj2mlq" -->

---
title: JEP 539: Strict Field Initialization in the JVM (Preview)
description: JEP 539 proposes strict field initialization as a preview VM feature in JDK 28, introducing an ACC_STRICT_INIT class file flag that ensures fields are...
canonical: https://daily.dev/posts/jep-539-strict-field-initialization-in-the-jvm-preview--oulwj2mlq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: JEP 539: Strict Field Initialization in the JVM (Preview) | daily.dev
og:description: JEP 539 proposes strict field initialization as a preview VM feature in JDK 28, introducing an ACC_STRICT_INIT class file flag that ensures fields are...
og:url: https://daily.dev/posts/jep-539-strict-field-initialization-in-the-jvm-preview--oulwj2mlq
og:image: https://api.daily.dev/og/posts/OuLWJ2MLq.png
og:image:alt: JEP 539: Strict Field Initialization in the JVM (Preview)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# JEP 539: Strict Field Initialization in the JVM (Preview)

**[Inside Java](https://daily.dev/sources/inside_java)** · 21 min read · 0 upvotes · 0 comments

## Summary

JEP 539 proposes strict field initialization as a preview VM feature in JDK 28, introducing an ACC_STRICT_INIT class file flag that ensures fields are explicitly initialized before being read, eliminating cases where default values like 0 or null are misread as real data. Final strictly-initialized fields are guaranteed to always return the same value once set, and the JVM enforces these invariants through bytecode verification for instance fields and larval-state tracking for static fields. The feature underpins upcoming value classes and enables JIT optimizations by letting the HotSpot compiler treat strict final fields as trusted. It requires --enable-preview at compile and run time, restricts mutation via deep reflection and standard serialization for classes with these fields, and needs writeReplace/readResolve as a workaround for deserialization.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://inside.java/2026/09/26/jep539-target-jdk28>

## Questions this post answers

### What is JEP 539 strict field initialization in JDK 28?

JEP 539 is a preview VM feature targeted for JDK 28 that lets compilers mark fields with a new ACC_STRICT_INIT class file flag, requiring them to be explicitly initialized before they can be read. Strictly-initialized fields never expose default values like 0 or null, and final strictly-initialized fields always return the same value once set. It requires --enable-preview at compile and run time.

_Developers tracking upcoming JVM integrity guarantees can follow JEP progress like this one on daily.dev._

### How does strict field initialization affect Java serialization and deep reflection?

Classes with strictly-initialized instance fields throw InvalidClassException during ObjectInputStream/ObjectOutputStream serialization unless they implement writeReplace and readResolve to substitute a different object. Deep reflection via Field.setAccessible cannot mutate strictly-initialized final fields at all; calling set on one always throws IllegalAccessException, even with --enable-final-field-mutation enabled.

_Teams planning serialization or reflection-heavy code can check compatibility notes like these before adopting new JVM previews on daily.dev._

### Why does the JVM currently allow reading unassigned final fields with inconsistent values?

Java's rule that final fields cannot be mutated does not apply while a class or instance is still being initialized, so code can read a default value like 0 before the real value is assigned, as illustrated by a case where App.appID is read as 0 by the Log class during circular class initialization before being properly set to the process ID. Strict field initialization is designed to close this gap.

_Developers debugging subtle field initialization bugs can dig into cases like this on daily.dev._

## Similar posts on daily.dev

- [JEP 500: Java to Enforce Strict Final Field Immutability by Restricting Reflection](https://daily.dev/posts/jep-500-java-to-enforce-strict-final-field-immutability-by-restricting-reflection-tifftywf3) · InfoQ · 1 upvotes · 0 comments
- [8389219: Implement JEP 401: Value Objects \(Preview\) by MrSimms · Pull Request \#31120 · openjdk/jdk](https://daily.dev/posts/8389219-implement-jep-401-value-objects-preview-by-mrsimms-pull-request-31120-openjdk-jdk-hghnkbn5r) · Hacker News · 0 upvotes · 0 comments
- [JEP 401: Value Objects \(Preview\)](https://daily.dev/posts/jep-401-value-objects-preview--1rxfjujqr) · Inside Java · 2 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#jvm](https://daily.dev/tags/jvm)

[View this post on daily.dev](https://daily.dev/posts/jep-539-strict-field-initialization-in-the-jvm-preview--oulwj2mlq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"JEP 539: Strict Field Initialization in the JVM (Preview)","url":"https://daily.dev/posts/jep-539-strict-field-initialization-in-the-jvm-preview--oulwj2mlq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/jep-539-strict-field-initialization-in-the-jvm-preview--oulwj2mlq"},"datePublished":"2026-09-26T08:22:51.817Z","dateModified":"2026-09-26T08:23:16.896Z","description":"JEP 539 proposes strict field initialization as a preview VM feature in JDK 28, introducing an ACC_STRICT_INIT class file flag that ensures fields are...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Inside Java","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inside Java","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/de5992d95f374790bdfd2ae03a16f6e3","url":"https://daily.dev/sources/inside_java"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/jep-539-strict-field-initialization-in-the-jvm-preview--oulwj2mlq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,jvm","timeRequired":"PT21M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inside Java","item":"https://daily.dev/sources/inside_java"},{"@type":"ListItem","position":3,"name":"JEP 539: Strict Field Initialization in the JVM (Preview)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/jep-539-strict-field-initialization-in-the-jvm-preview--oulwj2mlq#faq","mainEntity":[{"@type":"Question","name":"What is JEP 539 strict field initialization in JDK 28?","acceptedAnswer":{"@type":"Answer","text":"JEP 539 is a preview VM feature targeted for JDK 28 that lets compilers mark fields with a new ACC_STRICT_INIT class file flag, requiring them to be explicitly initialized before they can be read. Strictly-initialized fields never expose default values like 0 or null, and final strictly-initialized fields always return the same value once set. It requires --enable-preview at compile and run time. Developers tracking upcoming JVM integrity guarantees can follow JEP progress like this one on daily.dev."}},{"@type":"Question","name":"How does strict field initialization affect Java serialization and deep reflection?","acceptedAnswer":{"@type":"Answer","text":"Classes with strictly-initialized instance fields throw InvalidClassException during ObjectInputStream/ObjectOutputStream serialization unless they implement writeReplace and readResolve to substitute a different object. Deep reflection via Field.setAccessible cannot mutate strictly-initialized final fields at all; calling set on one always throws IllegalAccessException, even with --enable-final-field-mutation enabled. Teams planning serialization or reflection-heavy code can check compatibility notes like these before adopting new JVM previews on daily.dev."}},{"@type":"Question","name":"Why does the JVM currently allow reading unassigned final fields with inconsistent values?","acceptedAnswer":{"@type":"Answer","text":"Java's rule that final fields cannot be mutated does not apply while a class or instance is still being initialized, so code can read a default value like 0 before the real value is assigned, as illustrated by a case where App.appID is read as 0 by the Log class during circular class initialization before being properly set to the process ID. Strict field initialization is designed to close this gap. Developers debugging subtle field initialization bugs can dig into cases like this on daily.dev."}}]}
```

