[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HV-563) Enable Configuration#buildValidatorFactory() to be callable several times

Gunnar Morling (JIRA) noreply at atlassian.com
Tue Mar 27 13:59:48 EDT 2012


    [ https://hibernate.onjira.com/browse/HV-563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46094#comment-46094 ] 

Gunnar Morling edited comment on HV-563 at 3/27/12 12:59 PM:
-------------------------------------------------------------

The same {{Configuration}} instance can now be used to create several validator factories. In case any XML mapping streams are passed to the configuration, they are re-read whenever {{buildValidatorFactory()}} is invoked. In order to do so, the mapping streams are wrapped into {{BufferedInputStream}} s in case the original streams don't support the mark/reset contract.

      was (Author: gunnar.morling):
    The same {{Configuration}} instance can now be used to create several validator factories. In case any XML mapping streams are passed to the configuration, they are re-read whenever {{buildValidatorFactory()}} is invoked. In order to do so, the mapping streams are wrapped into {{BufferedInputStream}}s in case the original streams don't support the mark/reset contract.
  
> Enable Configuration#buildValidatorFactory() to be callable several times
> -------------------------------------------------------------------------
>
>                 Key: HV-563
>                 URL: https://hibernate.onjira.com/browse/HV-563
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 4.2.0.Final
>            Reporter: Gunnar Morling
>            Assignee: Hardy Ferentschik
>             Fix For: 4.3.0.Beta1
>
>
> Currently invoking {{buildValidatorFactory}} several times on one {{Configuration}} instance results in an NPE. While the spec currently doesn't clearly say whether invoking {{buildValidatorFactory}} more than once is legal or not, I personally think we should support that use case.
> Original HV forum post: https://forum.hibernate.org/viewtopic.php?f=9&t=1014788

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list