On 2012/09/10 22:57:14, skybrian wrote:
I don't know this code, but since pushViolations() and
iterableFromConstraintViolations() are both public methods, under the
principle
of being conservative about what you send and liberal about what you
receive, it
seems like iterableFromConstraintViolations() should return an empty
iterable
when given a null (since whatever calls it probably expects to be able
to
iterate) and pushViolations() should do the null check.

OK, I moved the ternary to BaseEditorDriver which will either pass a
null directly to pushViolations or will pass a non-null value to
iterableFromConstrantViolations.

I haven't tried to "fix" iterableFromConstrantViolations: if you pass a
null, you'll have an NPE as soon as your try to use the returned
iterable.

Note: I've verified that this is the only use of
iterableFromConstrantViolations.

https://gwt-code-reviews.appspot.com/1826803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to