You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by st...@apache.org on 2003/11/19 09:15:57 UTC

cvs commit: jakarta-pluto/src/container/org/apache/pluto/core/impl PortletRequestImpl.java

sthepper    2003/11/19 00:15:57

  Modified:    src/container/org/apache/pluto/core/impl
                        PortletRequestImpl.java
  Log:
  fixed removeAttribute method to distinguish between different scopes. Fix was provided by Steven Parkes.
  
  Revision  Changes    Path
  1.4       +10 -3     jakarta-pluto/src/container/org/apache/pluto/core/impl/PortletRequestImpl.java
  
  Index: PortletRequestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-pluto/src/container/org/apache/pluto/core/impl/PortletRequestImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PortletRequestImpl.java	22 Oct 2003 14:05:50 -0000	1.3
  +++ PortletRequestImpl.java	19 Nov 2003 08:15:57 -0000	1.4
  @@ -427,10 +427,17 @@
           {
               throw new IllegalArgumentException("Attribute name == null");
           }
  +        if (isNameReserved(name))
  +        {
  +            // Reserved names go directly in the underlying request
  +            _getHttpServletRequest().removeAttribute(name);
  +        }
  +        else
  +        {
   
  -        this._getHttpServletRequest().removeAttribute(
  -                                                     NamespaceMapperAccess.getNamespaceMapper().encode(portletWindow.getId(), name)
  -                                                     );
  +            this._getHttpServletRequest().
  +              removeAttribute(NamespaceMapperAccess.getNamespaceMapper().encode(portletWindow.getId(), name));
  +        }                                                  
       }
   
       public String getRequestedSessionId()