portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edalqu...@apache.org
Subject svn commit: r679513 - /portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultRequestAttributeService.java
Date Thu, 24 Jul 2008 19:42:30 GMT
Author: edalquist
Date: Thu Jul 24 12:42:30 2008
New Revision: 679513

URL: http://svn.apache.org/viewvc?rev=679513&view=rev
Log:
PLUTO-486 Caching the USER_INFO map in the request

Modified:
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultRequestAttributeService.java

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultRequestAttributeService.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultRequestAttributeService.java?rev=679513&r1=679512&r2=679513&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultRequestAttributeService.java
(original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/core/DefaultRequestAttributeService.java
Thu Jul 24 12:42:30 2008
@@ -74,7 +74,13 @@
      */
     public Object getAttribute(PortletRequest portletRequest, HttpServletRequest httpServletRequest,
PortletWindow portletWindow, String name) {
         if (PortletRequest.USER_INFO.equals(name)) {
-            return this.createUserInfoMap(portletRequest, portletWindow);
+            Map<String, String> userInfo = (Map<String, String>)httpServletRequest.getAttribute(PortletRequest.USER_INFO);
+            // Fix for PLUTO-486, cache the user_info map as a request attribute
+            if (userInfo == null) {
+                userInfo = this.createUserInfoMap(portletRequest, portletWindow);
+                httpServletRequest.setAttribute(PortletRequest.USER_INFO, userInfo);
+            }
+            return userInfo;
         }
         
         final String encodedName = this.encodeAttributeName(portletWindow, name);



Mime
View raw message