On 6/14/07, Maciej Zywno <[EMAIL PROTECTED]> wrote:
Hey,

I wanted to use BooleanUtils.toBooleanDefaultIfNull method however I can see
that it returns with:

return (bool.booleanValue() ? true : false);

Shouldn't it be just:

return bool.booleanValue()

?

Wouldn't it be faster the second way? Or is there any idea behind the way
it's implemented right now? Sorry if it's obvious, but I was just curious :)

No idea why it's that way - personally I'd do:

return (bool.booleanValue() == true);

and then lower down:

return (bool.booleanValue() == false);

Looking through the BooleanUtils class... I'm wondering if it really
has much value as a class. A lot of very obvious bits of code that
don't save a lot.

Hen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to