No problem - I was using size() to test if it was zero anyways.  I
just switched to using the isEmpty() method and it works fine.

Thanks,

- Brent

On Tue, 10 Aug 2004 17:40:42 +0200, Leszek Gawron <[EMAIL PROTECTED]> wrote:
> 
> 
> Brent Johnson wrote:
> > I'm getting the following exception when I try to get the size of a HashSet.
> >
> > org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> > file:/home/www/wedge/webapps/client/private/blocks/actions/examine.jx:48:59:java.lang.Exception:
> > size() : unknown type : class java.util.HashSet
> >
> > I can run a <jx:forEach> on the HashSet and it works fine, but when I
> > try and get the size I get an error.  Here's what I'm doing to get the
> > error:  ${item.getAttributes().size()}
> >
> > item.getAttributes() returns a HashSet with 2 items in it.
> This is due to how Jexl treats size function. size is a keyword in jexl
> that can be applied only to types known to jexl itself. Among these:
> - ArrayList
> - List
> and some other. the problem is that there is no java.util.Set there. The
> patch is a 2-liner. Had no time to send a patch though.
> 
> --
> Leszek Gawron                                      [EMAIL PROTECTED]
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to