I'm not sure about this exact problem, but this does bring to mind one
issue that I had noticed a number of times around the use of Boolean vs.
boolean in Roller.
I noticed that in a number of places, including pojo methods, that we
use the java.lang.Boolean class instead of the boolean primitive type,
and I don't understand why. My problem with using the Boolean object is
that it kind of breaks the binary nature of a boolean. In my mind a
boolean should only have 2 states, true or false. But with a Boolean
you can have true, false, or null, which seems wrong to me.
This may or may not be related to Jeff's problem, but in any case I
think it would be a good idea to settle on a standard for which type to
use. I tend to prefer the primitive boolean type unless there is a
distinct reason we can't use it.
-- Allen
Jeff Blattman wrote:
from server admin -> user admin, if i uncheck enabled and click save,
then return to edit the same user again, enabled is still checked. there
is an error in the logs ...
/WARN 2006-10-06 09:33:27,652 JDBCExceptionReporter:logExceptions - SQL
Error: 0, SQLState: 01004
ERROR 2006-10-06 09:33:27,656 JDBCExceptionReporter:logExceptions - Data
truncation: Column set to default value; NULL supplied to NOT NULL
column 'isenabled' at row 1/
i think this is because if the checkbox is not set, the form comes back
with a value of null. this results in a UserData.setEnabled(null), which
causes the above exception.
i wasn't quite sure where to add the fix. set if null set to false in
UserData.setEnabled()?