[jboss-jira] [JBoss JIRA] Created: (JBPORTAL-2252) PortletPreferences composed of multiple strings always only return one

Manuel Aznar Perez (JIRA) jira-events at lists.jboss.org
Fri Nov 28 09:00:38 EST 2008


PortletPreferences composed of multiple strings always only return one
----------------------------------------------------------------------

                 Key: JBPORTAL-2252
                 URL: https://jira.jboss.org/jira/browse/JBPORTAL-2252
             Project: JBoss Portal
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Portal Core
    Affects Versions: 2.7.0 Final
            Reporter: Manuel Aznar Perez
            Priority: Critical


The method "String[] PortletPreferences.getValues(String, String[])" only return one element, always.

The bug is in "org.jboss.portal.core.impl.portlet.state.PersistentPortletStateEntry"

At the method :

   public List<String> getValue()
   {
      if (dirty)
      {
         for (int i=0; i<strings.length; i++)
         {
            value = new ArrayList<String>();
            value.add(strings[i]);
         }
         dirty = false;
      }
      return value;
   }

Change it for:

   public List<String> getValue()
   {
      if (dirty)
      {
            value = new ArrayList<String>();
         for (int i=0; i<strings.length; i++)
         {
            value.add(strings[i]);
         }
         dirty = false;
      }
      return value;
   }

It is a dummy bug.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list