The JEP 401 change javac won't warn you about
Project Valhalla seems to be on the verge of being incorporated into the JVM… as a preview feature in JDK 28 that is.
This blog might be a bit premature, since it isn’t likely value types will be final in JDK 29.
Premature, yes, but the JEP is already worth a careful read.
I stumbled upon some interesting behavioral changes regarding equality.
Traditionally, the purpose of the == operator was to test whether two referenced objects have the same identity.
…
After the introduction of value objects, the purpose of the == operator is to test whether two referenced objects are indistinguishable.
— JEP 401