I don't think so. There are only 3 equals lines: foreach, context
instantiation and interpolate. Are others are different.
On Mar 20, 2014 12:41 AM, "Lucas Cavalcanti" <notifications@github.com>
wrote:

> In
> vraptor-core/src/main/java/br/com/caelum/vraptor/validator/DefaultValidator.java:
>
> > @@ -77,6 +90,22 @@ public Validator check(boolean condition, Message message) {
> >  	}
> >
> >  	@Override
> > +	public Validator validate(Object object, Class<?>... groups) {
> > +		if (object != null) {
> > +			Set<ConstraintViolation<Object>> violations = bvalidator.validate(object, groups);
> > +
> > +			for (ConstraintViolation<Object> v : violations) {
> > +				BeanValidatorContext ctx = new BeanValidatorContext(v);
> > +				String msg = interpolator.interpolate(v.getMessageTemplate(), ctx, locale);
> > +				String category = v.getPropertyPath().toString();
> > +				add(new SimpleMessage(category, msg));
> > +				logger.debug("added message {}={} for contraint violation", category, msg);
>
> This code is duplicated on MethodValidator. Can you reuse it somehow?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/caelum/vraptor4/pull/445/files#r10781904>
> .
>