commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r412719 - /jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/
Date Thu, 08 Jun 2006 10:49:19 GMT
Author: niallp
Date: Thu Jun  8 03:49:18 2006
New Revision: 412719

URL: http://svn.apache.org/viewvc?rev=412719&view=rev
Log:
Fix for CHAIN-31 -  Portlet Map implementations' entry Set should contain Map.Entry elements

Modified:
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletInitParamMap.java
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamMap.java
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamValuesMap.java
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletRequestScopeMap.java
    jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletSessionScopeMap.java

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java?rev=412719&r1=412718&r2=412719&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletApplicationScopeMap.java
Thu Jun  8 03:49:18 2006
@@ -25,6 +25,7 @@
 import java.util.Map;
 import java.util.Set;
 import javax.portlet.PortletContext;
+import org.apache.commons.chain.web.MapEntry;
 
 
 /**
@@ -77,8 +78,10 @@
     public Set entrySet() {
         Set set = new HashSet();
         Enumeration keys = context.getAttributeNames();
+        String key;
         while (keys.hasMoreElements()) {
-            set.add(context.getAttribute((String) keys.nextElement()));
+            key = (String)keys.nextElement();
+            set.add(new MapEntry(key, context.getAttribute(key), true));
         }
         return (set);
     }

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletInitParamMap.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletInitParamMap.java?rev=412719&r1=412718&r2=412719&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletInitParamMap.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletInitParamMap.java
Thu Jun  8 03:49:18 2006
@@ -25,6 +25,7 @@
 import java.util.Map;
 import java.util.Set;
 import javax.portlet.PortletContext;
+import org.apache.commons.chain.web.MapEntry;
 
 
 /**
@@ -70,8 +71,10 @@
     public Set entrySet() {
         Set set = new HashSet();
         Enumeration keys = context.getInitParameterNames();
+        String key;
         while (keys.hasMoreElements()) {
-            set.add(context.getInitParameter((String) keys.nextElement()));
+            key = (String) keys.nextElement();
+            set.add(new MapEntry(key, context.getInitParameter(key), false));
         }
         return (set);
     }

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamMap.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamMap.java?rev=412719&r1=412718&r2=412719&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamMap.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamMap.java
Thu Jun  8 03:49:18 2006
@@ -25,6 +25,7 @@
 import java.util.Map;
 import java.util.Set;
 import javax.portlet.PortletRequest;
+import org.apache.commons.chain.web.MapEntry;
 
 
 /**
@@ -70,8 +71,10 @@
     public Set entrySet() {
         Set set = new HashSet();
         Enumeration keys = request.getParameterNames();
+        String key;
         while (keys.hasMoreElements()) {
-            set.add(request.getParameter((String) keys.nextElement()));
+            key = (String) keys.nextElement();
+            set.add(new MapEntry(key, request.getParameter(key), false));
         }
         return (set);
     }

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamValuesMap.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamValuesMap.java?rev=412719&r1=412718&r2=412719&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamValuesMap.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletParamValuesMap.java
Thu Jun  8 03:49:18 2006
@@ -25,6 +25,7 @@
 import java.util.Map;
 import java.util.Set;
 import javax.portlet.PortletRequest;
+import org.apache.commons.chain.web.MapEntry;
 
 
 /**
@@ -70,8 +71,10 @@
     public Set entrySet() {
         Set set = new HashSet();
         Enumeration keys = request.getParameterNames();
+        String key;
         while (keys.hasMoreElements()) {
-            set.add(request.getParameterValues((String) keys.nextElement()));
+            key = (String) keys.nextElement();
+            set.add(new MapEntry(key, request.getParameterValues(key), false));
         }
         return (set);
     }

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletRequestScopeMap.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletRequestScopeMap.java?rev=412719&r1=412718&r2=412719&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletRequestScopeMap.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletRequestScopeMap.java
Thu Jun  8 03:49:18 2006
@@ -25,6 +25,7 @@
 import java.util.Map;
 import java.util.Set;
 import javax.portlet.PortletRequest;
+import org.apache.commons.chain.web.MapEntry;
 
 
 /**
@@ -77,8 +78,10 @@
     public Set entrySet() {
         Set set = new HashSet();
         Enumeration keys = request.getAttributeNames();
+        String key;
         while (keys.hasMoreElements()) {
-            set.add(request.getAttribute((String) keys.nextElement()));
+            key = (String) keys.nextElement();
+            set.add(new MapEntry(key, request.getAttribute(key), true));
         }
         return (set);
     }

Modified: jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletSessionScopeMap.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletSessionScopeMap.java?rev=412719&r1=412718&r2=412719&view=diff
==============================================================================
--- jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletSessionScopeMap.java
(original)
+++ jakarta/commons/proper/chain/trunk/src/java/org/apache/commons/chain/web/portlet/PortletSessionScopeMap.java
Thu Jun  8 03:49:18 2006
@@ -25,6 +25,7 @@
 import java.util.Map;
 import java.util.Set;
 import javax.portlet.PortletSession;
+import org.apache.commons.chain.web.MapEntry;
 
 
 /**
@@ -79,8 +80,10 @@
         Set set = new HashSet();
         Enumeration keys =
         session.getAttributeNames(PortletSession.PORTLET_SCOPE);
+        String key;
         while (keys.hasMoreElements()) {
-            set.add(session.getAttribute((String) keys.nextElement()));
+            key = (String) keys.nextElement();
+            set.add(new MapEntry(key, session.getAttribute(key), true));
         }
         return (set);
     }



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


Mime
View raw message