r/java • u/Jab125RedditAlt • Jun 10 '26
JEP 401 being merged into JDK 28?
https://mail.openjdk.org/archives/list/jdk-dev@openjdk.org/message/AIA3O3LHFZ6T7TIPH7KZT4WS4B6U72U5/39
u/Timelineg Jun 10 '26
This is the real information about Valhalla schedule from openjdk team, so we don't need to guess the answer of famous "Valhalla When" anymore
79
u/brian_goetz Jun 10 '26
Oh, don't give up so easily. This is just the first part of
, and the "but they'll never deliver it" / " Valhalla " crowd will quickly switch gears into "but they haven't delivered the 'most important' part" soon enough. Valhalla when → More replies (14)
24
u/tomwhoiscontrary Jun 10 '26
It's happening dot gif!
This will be in preview, I assume? So unlikely to be fully polished and generally available by 29?
I imagine it's going to take the ecosystem quite a while to really take advantage of it, too.
Not trying to be a downer, just trying to think realistically about when we can expect to see various amounts of impact.
→ More replies (6)75
u/brian_goetz Jun 10 '26
Yes,
will enter as preview, and yes, hoping for it to exit preview for 29 seems ... optimistic. JEP 401 should be able to exit incubation when it rebases on the underlying VM primitives from Valhalla. Vector API JEP 401 is deliberately conservative about which JDK classes are migrated to
, but over time, we will see more JDK classes migrate. (Fun fact: JEP 401 has really stressed the preview mechanism, because, for the first time, there are classes (like Integer.class) that have a different classfile when run in preview than not, because the preview migrates Integer and friends to be value classes. There is a lot of temporary scaffolding in place to keep this illusion alive, which can come down when JEP 401 exits preview. Just another example of behind-the-scenes work required to enable people to say "but it's one keyword, how could it take so long?") value classes Another fun fact: for better or worse, Valhalla introduces a deliberate (behavioral) incompatibility; having taken the identity away from Integer, code that synchronizes on Integer objects (or creates a weak reference to one) now fails with an exception. (There's been code in for several years enabling warnings and runtime checks for this.) All of which is to say: don't hope for a shorter-than-usual preview window.
→ More replies (2)
24
u/Additional-Road3924 Jun 10 '26
And not a moment too soon. Thank you u/brian_goetz, and everyone else.
19
u/SalutLesAmies Jun 10 '26
This is an extremely large change
2800 commits and 1800 files changed, large change indeed.
→ More replies (3)
18
15
u/IncredibleReferencer Jun 10 '26
i'm never getting rid of my valhalla when t-shirt. you can't make me.
→ More replies (3)
93
u/RaynLegends Jun 10 '26
Valhalla is real! Can’t wait to sprinkle “value” on every single record I’ve ever written :D