You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Josh Canfield <jo...@gmail.com> on 2011/09/05 06:13:06 UTC

Issue TAP5-1141 - if Object toString() returns null coercion to Boolean returns false

I'm working on TAP5-1621, adding Object -> Boolean type coercer. There
is a unit test that specifically tests that toString() returning null
results in false. Introducing Object->Boolean breaks this because it
only returns false if the actual Object is false.

Does anyone care about supporting null from toString() in this way?

Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Issue TAP5-1141 - if Object toString() returns null coercion to Boolean returns false

Posted by Massimo Lusetti <ml...@gmail.com>.
On Mon, Sep 5, 2011 at 6:13 AM, Josh Canfield <jo...@gmail.com> wrote:

> I'm working on TAP5-1621, adding Object -> Boolean type coercer. There
> is a unit test that specifically tests that toString() returning null
> results in false. Introducing Object->Boolean breaks this because it
> only returns false if the actual Object is false.
>
> Does anyone care about supporting null from toString() in this way?

I would say that that would return true only if the string is
equalsIngoreCase "true" otherwise false... something along the line of
Boolean.valueOf()

-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org