shale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hughes.matt" <>
Subject Re: SHALE-409 Bug
Date Wed, 02 May 2007 15:06:46 GMT

I started to write a patch for this and was writing a test case when I came
across MockRequestMap.  

1) Why do you need to mock a java.util.Map?
2) Isn't this implementation of entrySet() incorrect:

    public Set entrySet() {

        Set set = new HashSet();
        Enumeration keys = request.getAttributeNames();
        while (keys.hasMoreElements()) {
            set.add(request.getAttribute((String) keys.nextElement()));
        return set;

This is really returning a valueSet.  I came across this during my testing
as I kept getting a ClassCastException.  I was expecting a Map.EntrySet as
specified in the Map docs, but was getting the value object.

hughes.matt wrote:
> As best as I can tell there is a bug in the ViewPhaseListener in
> shale-view that is breaking other libraries, namely ajax4jsf by removing
> ALL entries from the request map.  I'd gladly fix this, but I can't tell
> what the code should be doing.  
> I have detailed the bug here:

View this message in context:
Sent from the Shale - Dev mailing list archive at

View raw message