On Wed, Oct 14, 2009 at 4:35 PM, Martin Marinschek <mmarinschek@apache.org> wrote:
Hi Dan,

fact is that the spec says this:

Coerce A to Boolean

   * If A is null or "", return false
   * Otherwise, if A is a Boolean, return A
   * Otherwise, if A is a String, and Boolean.valueOf(A) does not
throw an exception, return it

so it DOES touch the nulls. I don't know either who came up with this.

Right, I agree with you. I'm saying that this is silly behavior. Either it should leave null alone or choose to convert it only *if* the expected-type is a primitive (in this case a primitive boolean).

-Dan

--
Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action
Registered Linux User #231597

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://www.google.com/profiles/dan.j.allen