http://gwt-code-reviews.appspot.com/1619803/diff/1/user/src/com/google/gwt/user/client/ui/ValueListBox.java File user/src/com/google/gwt/user/client/ui/ValueListBox.java (right):
http://gwt-code-reviews.appspot.com/1619803/diff/1/user/src/com/google/gwt/user/client/ui/ValueListBox.java#newcode153 user/src/com/google/gwt/user/client/ui/ValueListBox.java:153: if (value == null) {
This check simply breaks setValue(null) (adding a test would be great: set the value to any non-null value, then set it back to
null). What you say makes sense; I'm going to think about it some omre and study the code. If anything I'll submit a patch that adds some documentation of the current behavior, and a test for the null case you suggested. (HasContrainedValues notes that that either putting an "unacceptable" value into the acceptable list as needed, or throwing an IllegalStatementException, would be acceptable behaviors, the implementations just need to document which they choose, which it doesn't seem like ValueListBox does current.) I'll also try to fix the failing tests that magically started working with the null check added. At least one was from a stub key provider that didn't handle null; that will be easy to fix. I think the others are just updating the assertions to match the implementation (it looks like they were written assuming the add-null-as-an-option entry wasn't there). Thanks! http://gwt-code-reviews.appspot.com/1619803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors