We released Hibernate Validator 6.0.12.Final which comes with a change to our CDI integration and fixes and improvements to our JDK 11 support.

This is a recommended upgrade for everyone using Hibernate Validator and it is a drop-in replacement for 6.0.11.Final in most cases (see our migration guide).

What’s new

CDI integration

While working on Hibernate Validator 6.0.10.Final, we noticed that with the CDI integration, methods of a class wouldn’t be validated if the class doesn’t have Bean Validation annotations itself e.g. if the annotations are on a superclass or an interface but not on the class proper.

The Bean Validation recommends to put the @ValidateOnExecution on every class you want validated for portability reasons but we thought it would be better to get rid of this unexpected limitation for the reference implementation.

As CDI does not allow to filter classes on annotations of parent classes and interfaces, this led us to fix the issue by scanning for annotations in the whole class hierarchy of the class passed to us by CDI. It was not ideal and we knew it would be a bit slower but we thought it would be acceptable.

Andrew Guibert from the Open Liberty team contacted us last week to let us know that this had a bad impact on the startup time of CDI applications, potentially leading to a 20% slowdown.

We decided to revert this patch for now as part of HV-1645 and we will open a CDI issue instead, hoping this limitation could be solved the CDI way and with very low performance impact in the future.

JDK 11 support

St├ęphane Nicoll from Pivotal informed us that when used with JDK 11, Hibernate Validator would pull JavaFX as a dependency. This is an unexpected consequence of our testing infrastructure with JDK 11 and JavaFX and is now fixed.

We also did some additional infrastructure work to be able to run our WildFly integration tests and run the TCK test suite in a WildFly container with JDK 11.

Full changelog

The complete list of fixed issues can be found on our JIRA.

Getting 6.0.12.Final

To get the release with Maven, Gradle etc. use the following GAV coordinates:

  • org.hibernate.validator:hibernate-validator:6.0.12.Final

  • org.hibernate.validator:hibernate-validator-cdi:6.0.12.Final

  • org.hibernate.validator:hibernate-validator-annotation-processor:6.0.12.Final

Note that the group id has changed from org.hibernate (Hibernate Validator 5 and earlier) to org.hibernate.validator (from Hibernate Validator 6 onwards).

Alternatively, a distribution bundle containing all the bits is provided on SourceForge (TAR.GZ, ZIP).

If you want to benefit from the new features of this version on WildFly, we also provide WildFly patches for WildFly 13 and WildFly 14 Beta1. You can read about how to apply such patches here.

What’s next?

Our efforts are now directed towards the new 6.1, which will introduce some structuring changes such as allowing getters with non standard names (name() instead of getName() for instance) and JSON validation support.

Feedback, issues, ideas?

To get in touch, use the usual channels:


Back to top