You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by bu...@apache.org on 2004/05/20 19:36:18 UTC

DO NOT REPLY [Bug 29109] - empty operator doesn't work with java.util.Set instances

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29109>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29109

empty operator doesn't work with java.util.Set instances

justyna.horwat@sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From justyna.horwat@sun.com  2004-05-20 17:36 -------
Submitted by Michael Santos:

----
Regarding this bug:

That's the expected behaviour in JSTL 1.0, according to the spec.

I don't have a bugzilla user and I am not a committer, so, I am unable to
help this user more.

Reference:
http://weblogs.java.net/pub/wlg/730

Regards,
Michael Nascimento Santos
----

In your bug report, you didn't specify which version of JSTL you are using.

If you are using JSTL 1.0 then this is the expected behavior. If you look at section A.3.8 of the JSTL 1.0 
specification you will find the empty operator defined as follows:

empty A is evaluated as follows: 

■  If A is null, return true, 
■ Otherwise, if A is the empty string, then return true. 
■ Otherwise, if  A isan empty array, then return true. 
■ Otherwise, if A is an empty Map, return true 
■ Otherwise, if A is an empty List, return true, 
■ Otherwise return false.

With JSTL 1.1 the EL was moved to the JSP 2.0 specification domain. With JSTL 1.1 it is now up to the 
domain of the JSP container to support the JSP 2.0 EL implementation.

In JSP 2.0 the empty operator behavior has changed slightly. In JSP 2.0 section JSP.2.3.7, the empty 
operator behaves as follows:

• If A is null, return true, 
• Otherwise, if A is the empty string, then return true. 
• Otherwise, if A is an empty array, then return true. 
• Otherwise, if A is an empty Map, return true, 
• Otherwise, if A is an empty Collection, return true, 
• Otherwise return false.

Moving to JSTL 1.1 and a JSP 2.0 container will address your problem.

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