Upcoming Jakarta Validation 4.0
Jakarta Validation 4.0 is on its way, as the release plan for this version was approved exactly one month ago on May 6!
What to expect from Jakarta Validation 4.0?
The highlights of this release plan are as follows:
-
This version of the specification will require Java SE 21 or higher.
-
Prepare for removal of the legacy approach to mark container elements for cascading validation, i.e.
@Valid List<MyBean> list;
. The next major version will consider such code to be requesting the cascading validation of theList
, and not its elements. It’s time to finally switch any remaining code using this approach to the much more encouraged and cleanerList<@Valid MyBean> list;
If you have a particular use case where you think that you won’t be able to express your constraints without relying on the legacy approach — please reach out on the corresponding issue. -
Introduce an alternative initialization method
ConstraintValidator#initialize
to provide more context than just the annotation so that it would be possible to use a more eager approach to initializing the constraint validator. -
Relax element order in the XSD where it doesn’t matter.
-
Add support for
ConstraintValidator
declaration via service loader. -
Remove any uses of the
SecurityManager
as it’s being deprecated without an alternative for some time now. -
Reevaluate the value extraction for
Optional
and whethernull
should be passed as an extracted value for empty optionals. -
Other more minor clarifications, cleanups and improvements.
Join the discussions at the issue tracker, or bring your proposals for future consideration.
Big push on Bean Validation 1.1
Like most of you, the Bean Validation specification is coming back from holiday fresh and motivated.
Java EE 7 is coming soon and to avoid missing the train, it is time to reap the fruits of all the discussions we have had over the last few months. I expect September and October to be focused on:
- integrating the various proposals in the speficication and flesh out the remaining problems
- taking decisions to unstuck discussions
- iterating over the features proposed in the early draft (we have had good feedback from the JAX-RS expert group to refine method validation)
The rest of the time will be focused on writing the reference implementation and the TCK and refine the various new features. We will also work with other expert groups to clarify the integration (CDI, JAX-RS, Java EE...).
Our priority list is published in the open. We will probably adjust it a bit but the main lines are now fixed. If you feel that something important is missing, come and help us identify it and build it.
And remember, if you come later and complain about Bean Validation, we will ask you: where were you? ;)
Latest news
Stay up to date, subscribe to the news feed.