All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

JEP 539: Preview Feature Introduces Strict Field Initialization in the JVM to Eliminate Default Value Observations

By

za3faran

3h ago· 17 min readenInsight

Summary

JEP 539 introduces strictly-initialized fields in the Java Virtual Machine as a preview feature. These fields must be initialized before being read, preventing default values like 0 or null from ever being observed. For strictly-initialized fields that are also final, the same value is always guaranteed to be observed. This is a preview VM feature designed for use by compilers that emit class files, aiming to eliminate the possibility of reading uninitialized memory in Java programs.

Source

Hacker NewsJEP 539: Preview Feature Introduces Strict Field Initialization in the JVM to Eliminate Default Value Observationsopenjdk.org

Key quotes

· 5 pulled
Introduce strictly-initialized fields in the Java Virtual Machine.
Such fields must be initialized before they are read, thus default values such as 0 or null are never observed.
For strictly-initialized fields that are final, the same value is always observed.
This is a preview VM feature, available for use by compilers that emit class files.
The Java Platform specifies that every variable is initialized before use, ensuring that a program can never read from uninitialized memory.
Snippet from the RSS feed
Introduce strictly-initialized fields in the Java Virtual Machine. Such fields must be initialized before they are read, thus default values such as 0 or null are never observed. For strictly-initialized fields that are final, the same value is always obs

You might also wanna read

Comments

Sign in to join the conversation.

No comments yet. Be the first.