[ 
https://issues.apache.org/jira/browse/BVAL-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456589#comment-13456589
 ] 

Matt Benson commented on BVAL-111:
----------------------------------

After evaluating, I believe you are correct.  A {{ConstraintValidatorFactory}} 
is associated with a {{ValidatorContext}} and it is wrong for BVal to be 
bypassing the context in favor of the factory('s default context).  Fix 
forthcoming, thanks for the report.

Matt
                
> factoryContext.getFactory().getConstraintValidatorFactory() not equals  
> factoryContext.getConstraintValidatorFactory()
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: BVAL-111
>                 URL: https://issues.apache.org/jira/browse/BVAL-111
>             Project: BVal
>          Issue Type: Bug
>          Components: jsr303
>    Affects Versions: 0.4
>            Reporter: chunlinyao
>
> I have a project use bval-0.2 and CODI-BV modules,after upgrade to bval-0.4 
> the bval CODI BV modules integration broke.
> After some debug I found this line in 
> AnnotationProcessor#getConstraintValidator method.
>    (ConstraintValidator<A, ? super T>) 
> factoryContext.getFactory().getConstraintValidatorFactory().getInstance(validatorTypes.get(assignableTypes.get(0)));
> It use factoryContext.getFactory().getConstraintValidatorFactory()
> This line was commit by revision 
> https://svn.apache.org/repos/asf/incubator/bval/sandbox/lang3-work@993590
> According to commit log it was extracted from Jsr303MetaBeanFactory.java
> But the original version was factoryContext.getConstraintValidatorFactory()
> CODI replace factoryContext.constraintValidatorFactory with a 
> CdiAwareConstraintValidatorFactory but the 
> factoryContext.getFactory().getConstraintValidatorFactory() keep the default 
> one.
> So, which method is the correct one to get ConstraintValidatorFactory?
> Is this a BVal bug or CODI bug?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to