It has been a while since the first alpha release of Validator 5.1, but as the saying goes: Haste makes waste :-) There is a lot going on in the Hibernate universe and over the last few months we have been especially busy with projects like Search and OGM. Not to speak of the new Hibernate website. Sigh, if we just had more contributors lending a hand (hint, hint).

Nevertheless, we found time to also work on Validator and the result is Hibernate Validator 5.1.0.Beta1 with some nice new features and bug fixes. The most notable feature is the introduction of @UnwrapValidatedValue and the corresponding ValidatedValueUnwrapper SPI (see HV-819). The idea is that in some cases the value to validate is contained in a wrapper type and one would have to add custom ConstraintValidator implementations for each constrained type and constraint. Think Java 8 Optional or JavaFX Property types. For example in JavaFX you could have:

private Property<String> name = new SimpleStringProperty( "Foo" );
Here the intention is to apply the @NotBlank constraint to the string value, not the the Property instance. By annotating name with @UnwrapValidatedValue the Validator engine knows that it has to unwrap the value prior to validation. To be able to do this, you need to also register an implementation of ValidatedValueUnwrapper which specifies how this unwrapping has to happen. You can do this via validation.xml as provider specific property (hibernate.validator.validated_value_handlers) or programmatically via:
Validator validator = Validation.byProvider( HibernateValidator.class )
        .addValidatedValueHandler( new PropertyValueUnwrapper() )
PropertyValueUnwrapper is in this case an implementation of ValidatedValueUnwrapper which tells the Validator engine how to unwrap a Property type and of which type the validated value is. The latter is needed for constraint validator resolution. For more information refer to the online documetnation.

What else is worth mentioning? Thanks to Brent Douglas for profiling of Hibernate Validator and detecting of some potential memory leaks - see HV-838 and HV-842. They are fixed now.

Thanks also to Victor Rezende dos Santos and Shin Sang-Jae. Victor found a problem with the Brazilian CPF constraint which lead to its refactoring HV-808, as well as the deprecation of @ModCheck and the introduction of dedicated @Mod10 and @Mod11 constraints as replacements. Shin on the other hand provided a Korean translation of the ValidationMessages properties bundle.

Last but not least, we also have an improved the memory footprint by reducing the amount of memory consumed by metadata (HV-589).

In total 29 resolved issues. Not bad in my opinion and definitely worth upgrading to Validator 5.1.

Maven artefacts are on the JBoss Maven repository under the GAV org.hibernate:hibernate-validator:5.1.0.Beta1 and distribution bundles are available on SourceForge. Send us feedback either via the Hibernate Validator forum or on stackoverflow using the hibernate-validator tag.


07. Feb 2014, 14:06 CET | Link

It's the great news. I'm happy tp know that the problem with the potential memory leaks has been fixed.

11. Feb 2014, 07:51 CET | Link

Thanks for taking the time to write that, I found it very educational. If you get a chance you should visit my site as well. I hope you have a great day!

02. Apr 2014, 16:36 CET | Link

And there might be lots of an instances when you would have felt embarrassed about sporting the same elderly watch when you require to attend any conference or go on an official task.Replica watches save the pride of lots of individuals who undergo these kinds of insecure feelings. Without spending a fortune you could make a style statement for your own self.Replica Rolex watches on replica pimp has become a craze with people because it meets with all these requirements.And also when you look for a replica watch you will require it to be steadfast in its performance like that of the original,which is without a doubt present in a replica Rolex watch.This watch has some brilliant features that will certainly going to take your heart.First thing that you will love about this watch is its looks. It is hence not surprising to find executive purchase over replica Rolex watches.They need to gift to their boss.They know that the best way to impress the boss is by Monogram Empreinte replica louis vuitton handbags giving him replica Rolex watches.While they are at it, they are surprised at the down to rolex replica uk earth prices of the replica Rolex watches as well as a number of them take for their spouse.

29. Apr 2014, 13:07 CET | Link

Pas d'odeur piquante (ou nous wouldve barfed tout ce que nous avons mangé boutique guess ). Il était plutôt sympa et venteux Nous avons eu un grand anniversaire de mariage de la 5ème année. Maintenant sorcières, je sais que vous êtes tous intéressés à savoir si je suis le citron jaune guess ou Lanvin. La réponse est non, je n'ai pas (je pourrais juste me hafta que pour moi guess femme mais je crains seulement que le clochard de guess en jaune serait se salir girl power woohoo rapide, femme du monde, levez la main droite et vous acheter un portefeuille guess ). Ok, donc je n'ai pas eu un sac de DH renifler mais je ne reçois quelque chose wayy mieux secret! Pensez-vous que vous pouvez deviner ce que c'est? Le temps de faire une sieste maintenant. DT a dormi avec nous hier soir, mais a continué à nous réveiller guess homme parler d'avoir un enfant hyperactif! Pendant ce temps, continuer à voter pour qui vous pensez mérite de gagner le concours de collecte-un-sac de vanter! Bryanboy et je n'ai nos favoris personnels, mais nous vous attendons pour le décompte des votes VOS, chers lecteurs! Avoir un bon week-end! Post-scriptum Cher ami baghag LPT m'ont envoyé des photos des montre guess (prises à la boutique Guess) il ya quelques jours. Bien sûr, mon cœur battait si fort quand j'ai vu tous ces tsk. Je ne reviendrai pas dérange posséder une pochette boutique guess .

montre femme guess montre guess

24. May 2014, 17:35 CET | Link

The design of the luxury duplicate Louis Vuitton bags is ideal for covering a multitude of sins as the bags flows from the bust line. An Holiday Louis Vuitton replica handbags is also ideal for Girls as the looser luxury leather can accommodate your growing tummy. This style will make the Stylish Women more confident and comfortable. Strangely luxury Louis Vuitton Handbags are flattering to the fuller figure as well as those with a smaller bust. If you have a fuller figure avoid ruching or ruffles on the bodice. A good louis vuitton replica bra and some emphasis on the bodice rather than the luxury leather will enhance the smaller bust. for Women to be who decide to shopping a Imitation style Louis Vuitton bags should pay attention to these factors, try to wear this design bags to make you looks royal and nobleness.

28. Jul 2014, 09:24 CET | Link

Shiny rhinestones, luxurious materials, avant-garde design ...... Roger Vivier various innovative ideas to create gorgeous feeling 2014 Winter footwear. Roger Vivier creative director Bruno Frisoni's draw creative replica louis vuitton inspiration from the luxury market in Central Asia, nomadic costumes worn for the 2014 autumn and winter footwear series into a new fashion elements. Roger Vivier2014 Winter Series heels exudes charm cartier replica breath, Bruno Frisoni launched Stiletto-Sphère series with a new design, striking a ball with the heel of the shoe body with convergence. High boots and ankle boots shiny rolex replica shiny leather using a term to add retro feeling, and the first time a bold avant-garde Virgule heel, full luxury aesthetics!

30. Aug 2014, 03:43 CET | Link

Best friend successive good years, Gucci Shoes Factory, winter spent in Sanya, Monster Beats Outlet, so winter home, seems to be nowhere in sight, North Jackets Outlet, both a little rusty, Nike Air Max Shoes, but also very cordial, Burberry Outlet Online, forward to tonight, feather-like snow, MCM Bags Outlet, drifts underground, Coach Black Friday, looking at that the floc, Louis Vuitton Outlet, fly like snow Ling, Michael Kors Outlet Online, eloquent, Polo Outlet Online, flying in the sky, Cheap Canada Goose, limp walk downs, strange things, Marc Jacobs Outlet Online, I float thinking lianpian, North Outlet Online, poetic heart wenqing, not help surging surging, Coach Factory Outlet, so I borrowed the winter, Ralph Lauren UK, snows research ink, Longchamp Sacs Sortie, into the mind of inactivity, Michael Kors Outlet, the white snow everywhere, Monster Beats By Dre, wrapped in some different, Ralph Lauren Outlet, kind of scenery, Oakley Sunglaases Outlet, wherever the wind in the faces, of the people, Michael Kors Bags Outlet, who are very Huddled, could not help.

Post Comment