You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by at...@apache.org on 2010/10/16 03:28:45 UTC

svn commit: r1023164 - in /portals/pluto: branches/pluto-2.0.x/pluto-container/src/main/java/org/apache/pluto/container/impl/ trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/

Author: ate
Date: Sat Oct 16 01:28:45 2010
New Revision: 1023164

URL: http://svn.apache.org/viewvc?rev=1023164&view=rev
Log:
PLUTO-598: Retrieving Portlet invoked servlet request attributes should first check PortletRequest attributes before using fallback to the web container

Modified:
    portals/pluto/branches/pluto-2.0.x/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java
    portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java

Modified: portals/pluto/branches/pluto-2.0.x/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/pluto-2.0.x/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java?rev=1023164&r1=1023163&r2=1023164&view=diff
==============================================================================
--- portals/pluto/branches/pluto-2.0.x/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java (original)
+++ portals/pluto/branches/pluto-2.0.x/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java Sat Oct 16 01:28:45 2010
@@ -1058,9 +1058,10 @@ public class HttpServletPortletRequestWr
             // return the derived path attribute value
             return pathAttributeValues.get(name);
         }
-        // always first try to retrieve the attribute from the web container itself
-        Object value = getRequest().getAttribute(name);
-        return value != null ? value : portletRequest.getAttribute(name);
+        // First try to retrieve the attribute from the (possibly buffered/cached/previously set) portletRequest
+        Object value = portletRequest.getAttribute(name);
+        // if null, fall back to retrieve the attribute from the web container itself
+        return value != null ? value : getRequest().getAttribute(name);
     }
 
     @Override

Modified: portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java?rev=1023164&r1=1023163&r2=1023164&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java (original)
+++ portals/pluto/trunk/pluto-container/src/main/java/org/apache/pluto/container/impl/HttpServletPortletRequestWrapper.java Sat Oct 16 01:28:45 2010
@@ -1058,9 +1058,10 @@ public class HttpServletPortletRequestWr
             // return the derived path attribute value
             return pathAttributeValues.get(name);
         }
-        // always first try to retrieve the attribute from the web container itself
-        Object value = getRequest().getAttribute(name);
-        return value != null ? value : portletRequest.getAttribute(name);
+        // First try to retrieve the attribute from the (possibly buffered/cached/previously set) portletRequest
+        Object value = portletRequest.getAttribute(name);
+        // if null, fall back to retrieve the attribute from the web container itself
+        return value != null ? value : getRequest().getAttribute(name);
     }
 
     @Override