On 23 Jan 2012, at 2:48 PM, Emmanuel Bernard <emmanuel(a)hibernate.org> wrote:
The question is do we want to do that or lean towards one of the
alternative methods:
- an explicit new method deprecating addNode
- relaxing NodeBuilderDefinedContext and adding the new contract on it
In the proposal you are saying about relaxing NodeBuilderDefinedContext: "But that
would break the contextual
and safety of the API as this interface is also returned by atKey and atIndex."
Can you provide an example?
Also in the proposal you are saying that:
context.buildConstraintViolationWithTemplate("oh noes")
.addNode(null) //ie the contained element
inIterable().atKey(someKey)
.addConstraintViolation();
would be the natural solution. Why is ".addNode(null)" natural and why could we
not have inIterable() directly
on ConstraintViolationBuilder?
--Hardy