Sorry, I didn't express it well I was thinking that using javax.validation.Validator would be a cleaner way to validate the bean instances instead of performing manual checks (like the null check mentioned above)
The above code validates your instance according the BV rules (@NotNull etc) and returns a Set of javax.validation.ConstraintViolation.
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
Sorry, I didn't express it well
I was thinking that using javax.validation.Validator would be a cleaner way to validate the bean instances instead of performing manual checks (like the null check mentioned above)
e.g:
@Inject
private Validator validator;
Set<ConstraintViolation<AndroidVariant>> violations = validator.validate(androidVariantInstance);
The above code validates your instance according the BV rules (@NotNull etc) and returns a Set of javax.validation.ConstraintViolation.