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 bl...@apache.org on 2003/12/05 15:41:23 UTC

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

blumm       2003/12/05 06:41:23

  Modified:    src/container/org/apache/pluto/core/impl
                        PortletSessionImpl.java
  Log:
  Correction that ONLY attributes of PORTLET_SCOPE are returned.
  PR:
  Obtained from:
  Submitted by:	
  Reviewed by:	
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.4       +5 -1      jakarta-pluto/src/container/org/apache/pluto/core/impl/PortletSessionImpl.java
  
  Index: PortletSessionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-pluto/src/container/org/apache/pluto/core/impl/PortletSessionImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PortletSessionImpl.java	22 Oct 2003 13:51:17 -0000	1.3
  +++ PortletSessionImpl.java	5 Dec 2003 14:41:23 -0000	1.4
  @@ -175,13 +175,17 @@
   
               Vector portletAttributes = new Vector();
   
  +	        /* Fix that ONLY attributes of PORTLET_SCOPE are returned. */
  +            int prefix_length = "javax.portlet.p.".length();
  +            String portletWindowId = portletWindow.getId().toString();
  +            
               while (attributes.hasMoreElements())
               {
                   String attribute = (String)attributes.nextElement();
   
                   int attributeScope = PortletSessionUtil.decodeScope(attribute);
                   
  -                if (attributeScope == PortletSession.PORTLET_SCOPE)
  +                if (attributeScope == PortletSession.PORTLET_SCOPE && attribute.startsWith(portletWindowId, prefix_length))
                   {
                   	String portletAttribute = PortletSessionUtil.decodeAttributeName(attribute);