
Value Classes are coming to Java
I once spent a good twenty minutes debugging a failing test before realizing the bug was d1 == d3 instead of d1.equals(d3). Both were LocalDate.of(1996, 1, 23). Both represented the exact same date. And Java looked me dead in the eye and said “false.” That’s not a bug in LocalDate. That’s just what happens when every object in Java carries an identity, whether it needs one or not. JEP 401 is the JEP that finally lets you opt out. ...








