[jsr-314-open] Coercion in the EL
Andy Schwartz
andy.schwartz at oracle.com
Thu Oct 15 14:45:11 EDT 2009
Dan Allen wrote:
> On Wed, Oct 14, 2009 at 4:35 PM, Martin Marinschek
> <mmarinschek at apache.org <mailto:mmarinschek at 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).
+1
Seems like we should take this issue to the JSP/EL EG.
Andy
>
> -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
More information about the jsr-314-open-mirror
mailing list