Pete Muir commented on Task BVAL-307

A few comments:

1) (Hard) dependency on CDI. Actually it's a dependency on JSR-330/@Inject. Also, it's only a compile time dependency, at least on OpenJDK - if the qualifier isn't used, the @Qualifier annotation won't be loaded, also OpenJDK doesn't fail if it can't classload annotations. If you want to avoid this entirely, you can actually not put @Qualifier on the annotation at all, but add it at deployment time using the CDI event BeforeBeanDiscovery. I would not recommend this, as it will make the javadoc for the annotation incomplete.

2) The rules should follow the existing rules laid down for JNDI, for determining the default provider. So if you do @Inject Validator validator, it should inject the same validator as is bound into JNDI for the application. This should always be followed, regardless of how many providers are registered. Note that the @Default qualifier is implicit at an unqualified injection point.

3) If we also want to allow injecting other providers, I would prefer the provider to define to the annotation e.g. @HibernateValidator. This is more consistent with CDI IMO. These providers should not be given the @Default qualifier to stop them conflicting with the default provider.

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