tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: [taglibs] Null handling in Functions
Date Mon, 05 Jul 2010 06:36:17 GMT
Agreed on 1.18.2. For String params (and Number, Character and
Boolean) it looks like Functions should be able to assume that they're


On Sun, Jul 4, 2010 at 12:20 PM, Jeremy Boynes <> wrote:
> Different methods in our Functions implementation handle null parameters inconsistently;
for example, toUpperCase does not perform any null check whereas indexOf does. If I grok the
EL spec correctly, all String parameter values should be coerced by the rules in 1.18.2 which
would guarantee that nulls are converted to "" and hence the null checks in the implementation
are redundant. I confirmed that  the EL implementation in Tomcat 7 [1] does this.
> My thought would be to remove them and rely on the JSP Engine to coerce correctly. If
this isn't safe then we should add similar checks to the other methods.
> Thoughts?
> Thanks
> Jeremy
> [1]
called from AstFunction#getValue
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message