I notice that both the JSF 1.2 RI and MyFaces throw
NullPointerExceptions if you try to construct a SelectItem with a null
object value.   Why?   Null is ideal for specifying a "nothing
selected" selection.

Worse, you can bypass the check simply by doing

item = new SelectItem();
item.setLabel("Select an option")

instead of

item = new SelectItem(null, "Select an option"))

-Mike

Reply via email to