]
Hardy Ferentschik resolved HV-288.
----------------------------------
Resolution: Fixed
The validator doesn't validate correctly groups composing a group
sequence
--------------------------------------------------------------------------
Key: HV-288
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-288
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Affects Versions: 4.0.2.GA
Environment: Sun JVM - 1.6
Reporter: Igor Leboroni
Assignee: Hardy Ferentschik
Fix For: 4.1.0-Beta-1
I have the following class.
{code}
public class Try {
@NotNull(groups=BaseComponent.class)
private int field1;
@NotNull(groups=Component.class)
private int field2;
@NotNull(groups=OtherComponent.class)
private int field3;
public interface BaseComponent {}
public interface Component extends BaseComponent{}
public interface OtherComponent {}
@GroupSequence({Component.class, OtherComponent.class})
public interface GlobalCheck {}
}
{code}
Invoking the validation on the group GlobalCheck results in the check of the NotNull
constraint on field2 and field3 (if the field2 validation is passed). The NotNull
field1's constraint isn't evaluated. In fact every constraint that belongs to a
group parent of one of the groups composing the group sequence isn't evaluated at
all.
I think the problem is in the {{org.hibernate.validator.engine.ValidatorImpl
validateInContext(U value, GlobalExecutionContext<T> context, GroupChain groupChain,
PathImpl path)}} method, when group sequences are evaluated.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: