You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bval.apache.org by "chunlinyao (JIRA)" <ji...@apache.org> on 2012/09/15 04:54:07 UTC
[jira] [Created] (BVAL-111)
factoryContext.getFactory().getConstraintValidatorFactory() not equals
factoryContext.getConstraintValidatorFactory()
chunlinyao created BVAL-111:
-------------------------------
Summary: 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
[jira] [Closed] (BVAL-111) ValidatorFactory-bound
ConstraintValidatorFactory used instead of ValidatorContext-bound instance
Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BVAL-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Benson closed BVAL-111.
----------------------------
> ValidatorFactory-bound ConstraintValidatorFactory used instead of ValidatorContext-bound instance
> -------------------------------------------------------------------------------------------------
>
> 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
> Fix For: 0.5
>
>
> 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
[jira] [Updated] (BVAL-111) ValidatorFactory-bound
ConstraintValidatorFactory used instead of ValidatorContext-bound instance
Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BVAL-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Benson updated BVAL-111:
-----------------------------
Summary: ValidatorFactory-bound ConstraintValidatorFactory used instead of ValidatorContext-bound instance (was: factoryContext.getFactory().getConstraintValidatorFactory() not equals factoryContext.getConstraintValidatorFactory())
> ValidatorFactory-bound ConstraintValidatorFactory used instead of ValidatorContext-bound instance
> -------------------------------------------------------------------------------------------------
>
> 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
> Fix For: 0.5
>
>
> 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
[jira] [Resolved] (BVAL-111)
factoryContext.getFactory().getConstraintValidatorFactory() not equals
factoryContext.getConstraintValidatorFactory()
Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BVAL-111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Benson resolved BVAL-111.
------------------------------
Resolution: Fixed
Fix Version/s: 0.5
Committed revision 1385302.
> 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
> Fix For: 0.5
>
>
> 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
[jira] [Commented] (BVAL-111)
factoryContext.getFactory().getConstraintValidatorFactory() not equals
factoryContext.getConstraintValidatorFactory()
Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
[ 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