You can make the exact same argument about *any* type. The point of
*any* type is to restrict the possible set of values.
Unfortunately, prohibiting null everywhere turns out to be a major
PITA in practice.
On Thu, Dec 4, 2008 at 12:43 PM, Francisco Jose Peredo
Yes, but I have always felt uneasy about a null boolean thing... the
point of boolean is to restrict the possible outcomes of something to
"true" or "false", but with a nullable boolean we now have 3
outcomes "true", "false" and "undefined"... and the problem
"undefined" is also "typeless" and therefore bug prone, the code:
//do something else
looks like something perfectly valid, but it turns out it can crash
because isUserInRole can return null.
I mean I can understand it for MailComponent.getBoolean, and
org.jboss.seam.ui.util.JSF.getBooleanValue, but I don't like it for
Wouldn't it be better to use an Enum if there are 3 or more possible
seam-dev mailing list