shale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hughes.matt" <hughes.m...@gmail.com>
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:
> https://issues.apache.org/struts/browse/SHALE-409#action_40918
> https://issues.apache.org/struts/browse/SHALE-409
> 

-- 
View this message in context: http://www.nabble.com/SHALE-409-Bug-tf3676627.html#a10287091
Sent from the Shale - Dev mailing list archive at Nabble.com.


Mime
View raw message