We're updating the issue view to help you get more done. 

Missing violation when a bean is validated with different groups

Description

When a bean is validated multiple times with different groups, in some cases the constraints for the second group are not reported. This used to work in 5.4.3.Final

Example that reproduces reliably:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 @Test public void sameBeanDifferentGroups() { Set<ConstraintViolation<Bean>> violations = Validation.buildDefaultValidatorFactory().getValidator().validate(new Bean()); assertThat(violations, hasSize(1)); } ​ interface Group { } ​ static class Bean { @Valid @ConvertGroup(from = Default.class, to = Group.class) Bean a = this; @AssertTrue(groups = Group.class) boolean b; }

Here I expect the AssertTrue to be reported on path "a.b"

Environment

None

Status

Assignee

Marko Bekhta

Reporter

Maarten van der Zwaart

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

Backport?

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

6.0.16.Final

Priority

Major