Bug 11590 - Can' access array size
Summary: Can' access array size
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-09 14:06 UTC by Eric Jain
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 Eric Jain 2002-08-09 14:06:30 UTC
If 'list' is a java.util.ArrayList, shouldn't the variable be cast to an 
integer representing its size in the following expression:

<jstl:if test="${list < 10}">

rather than failing with 'Attempt to coerce a value of 
type "java.util.ArrayList" to type "java.lang.Long"'? Note that the method 
List.size() can't be called,  as list.size is mapped to either List.get("size") 
or List.getSize(), neither of which exist.
Comment 1 Shawn Bayern 2002-08-09 14:13:29 UTC
That's not a bad idea; in fact, I think it might work.  However, the JSTL 1.0 
specification does call for it, so this is not the right venue to offer the 
suggestion.  If you mail jsr-52-comments@jcp.org, the comment will be recorded 
for future versions of JSTL.
Comment 2 Shawn Bayern 2002-08-09 14:39:12 UTC
Of course, I meant "does _not_ call for it".  :-)