]
Hardy Ferentschik updated HV-183:
---------------------------------
Fix Version/s: 4.0.0.CR1
Composite constraints have to honour the payload parameter as well
------------------------------------------------------------------
Key: HV-183
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-183
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Affects Versions: 4.0.0.Beta1
Reporter: Hardy Ferentschik
Assignee: Hardy Ferentschik
Fix For: 4.0.0.CR1
i tested the current payload impl.
it works for simple constraints - e.g.:
@NotNull(payload = Severity.Warn.class)
but it doesn't work for composite constraints - e.g.:
@NickName(payload = Severity.Warn.class)
with the following workaround it works:
@NotNull
@Size
//...
public @interface NickName {
@OverridesAttribute.List({
@OverridesAttribute(constraint = NotNull.class, name = "payload"),
@OverridesAttribute(constraint = Size.class, name = "payload")
})
Class<? extends ConstraintPayload>[] payload() default {};
//...
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: