Bug 7095 - ${'true' and false} gives true
Summary: ${'true' and false} gives true
Status: CLOSED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: All All
: P3 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-13 18:35 UTC by Hans Bergsten
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Bergsten 2002-03-13 18:35:21 UTC
The EL doesn't evaluate the expression ${'true' and false} correctly; the result
is true instead of false.

According to A.3.7.1, both terms should be coerced to Boolean, and then
compared. A.7.4 says that a String is coerced using Boolean.valueOf(),
which should give true for the String 'true'. Hence, the end-result should
be true.
Comment 1 Shawn Bayern 2002-03-13 22:48:49 UTC
Thanks Hans.  Nathan sent me a patch, and I merged the changes in.