You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/07/01 07:02:03 UTC

DO NOT REPLY [Bug 49534] New: ForEachSupport handles unsupported items inconsistently

https://issues.apache.org/bugzilla/show_bug.cgi?id=49534

           Summary: ForEachSupport handles unsupported items
                    inconsistently
           Product: Taglibs
           Version: 1.2.0
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Standard Taglib
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: jboynes@apache.org


When the "items" attribute contains an unsupported type an exception is thrown
with a "FOREACH_BAD_ITEMS" error message. However, if it contains a value
expression that evaluates to an unsupported type, no error occurs. An example
would be the snippet:

  <c:set var="hello" value="${true}"/>
  <c:forEach var="x" items="#{hello}">
      <c:out value="${x}"/>
  </c:forEach>

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49534] ForEachSupport handles unsupported items inconsistently

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49534

--- Comment #1 from Jeremy Boynes <jb...@apache.org> 2010-07-01 01:04:26 EDT ---
Created an attachment (id=25674)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25674)
Patch to throw exception on invalid items in deferred expression

This patch also removes commented out code that would have bound an deferred
expression to the loop variable; this function is performed in LoopTagSupport
and is not needed

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 49534] ForEachSupport handles unsupported items inconsistently

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=49534

Henri Yandell <ba...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
         OS/Version|                            |All

--- Comment #2 from Henri Yandell <ba...@apache.org> 2010-07-01 02:16:30 EDT ---

Looks great - thanks :)

svn ci -m "Adding an exception when the type is not recognized in
determineLengthAndType; and removing some unused variables/commented out lines
in the prepare method. Thanks to Jeremy Boynes' patch to #49534"
Sending       
impl/src/main/java/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java
Transmitting file data .
Committed revision 959527.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org