arron 02/05/12 19:54:00 Modified: src/share/org/apache/struts/taglib/logic EmptyTag.java Log: Fix for bug 7313. Testing for an empty collection. Revision Changes Path 1.2 +8 -5 jakarta-struts/src/share/org/apache/struts/taglib/logic/EmptyTag.java Index: EmptyTag.java =================================================================== RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/EmptyTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- EmptyTag.java 8 Jul 2001 04:15:13 -0000 1.1 +++ EmptyTag.java 13 May 2002 02:54:00 -0000 1.2 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/EmptyTag.java,v 1.1 2001/07/08 04:15:13 martinc Exp $ - * $Revision: 1.1 $ - * $Date: 2001/07/08 04:15:13 $ + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/logic/EmptyTag.java,v 1.2 2002/05/13 02:54:00 arron Exp $ + * $Revision: 1.2 $ + * $Date: 2002/05/13 02:54:00 $ * * ==================================================================== * @@ -62,7 +62,7 @@ package org.apache.struts.taglib.logic; - +import java.util.Collection; import javax.servlet.jsp.JspException; import org.apache.struts.util.RequestUtils; @@ -72,7 +72,7 @@ * is empty for this request. * * @author Martin Cooper - * @version $Revision: 1.1 $ $Date: 2001/07/08 04:15:13 $ + * @version $Revision: 1.2 $ $Date: 2002/05/13 02:54:00 $ */ public class EmptyTag extends ConditionalTagBase { @@ -117,6 +117,9 @@ if (value instanceof String) { String strValue = (String)value; empty = (strValue.length() < 1); + } else if (value instanceof Collection) { + Collection collValue = (Collection)value; + empty = collValue.isEmpty(); } else { empty = false; }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>