portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jf...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets GenericMVCContext.java
Date Sat, 28 Aug 2004 20:02:36 GMT
jford       2004/08/28 13:02:36

  Modified:    src/java/org/apache/jetspeed/portal/portlets
                        GenericMVCContext.java
  Log:
  Fixed getKeys() to return all keys.
  
  PR: JIRA #JS1-508
  
  Revision  Changes    Path
  1.3       +6 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/GenericMVCContext.java
  
  Index: GenericMVCContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/portlets/GenericMVCContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GenericMVCContext.java	23 Feb 2004 04:03:33 -0000	1.2
  +++ GenericMVCContext.java	28 Aug 2004 20:02:35 -0000	1.3
  @@ -128,7 +128,11 @@
   
       public Object[] getKeys()
       {
  +        HashSet allKeys = new HashSet();
  +        
           Set keySet = data.keySet();
  +        
  +        allKeys.addAll(keySet);
   
           Iterator itr = additionalContexts.iterator();
   
  @@ -137,17 +141,16 @@
               Object[] keys = ((Context) itr.next()).getKeys();
               for (int i = 0; i < keys.length; i++)
               {
  -                keySet.add(keys[i]);
  +                allKeys.add(keys[i]);
               }
           }
   
           // (Object[])java.lang.reflect.Array.newInstance((new Object()).getClass(),2);
  -        return data.keySet().toArray();
  +        return allKeys.toArray();
       }
   
       public Object put(java.lang.String key, java.lang.Object value)
       {
  -
           return data.put(key, value);
       }
   
  
  
  

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


Mime
View raw message