You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by jm...@apache.org on 2004/06/15 15:27:27 UTC

cvs commit: ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/pluto/driver WSRPPortletEntityImpl.java

jmacna      2004/06/15 06:27:27

  Modified:    src/org/apache/wsrp4j/producer/provider/pluto/driver
                        WSRPPortletEntityImpl.java
  Log:
  Contributed by Scott Goldstein (mailto:sgoldstein@ezrs.com).  
  Fixes WSRP4J-23:
   WSRPPortletEntityImpl.clone() doesn't account for null preference values
  
  Revision  Changes    Path
  1.5       +7 -4      ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/pluto/driver/WSRPPortletEntityImpl.java
  
  Index: WSRPPortletEntityImpl.java
  ===================================================================
  RCS file: /home/cvs/ws-wsrp4j/src/org/apache/wsrp4j/producer/provider/pluto/driver/WSRPPortletEntityImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- WSRPPortletEntityImpl.java	1 Jun 2004 13:42:45 -0000	1.4
  +++ WSRPPortletEntityImpl.java	15 Jun 2004 13:27:26 -0000	1.5
  @@ -64,11 +64,14 @@
           {
               Preference pref = (Preference)oldPrefs.next();
   
  -            ArrayList values = new ArrayList();
  +            ArrayList values = null;
               Iterator iter = pref.getValues();
  -            while (iter.hasNext())
  -            {
  -                values.add(iter.next());
  +            if (iter != null) {
  +                values = new ArrayList();
  +                while (iter.hasNext()) 
  +                {
  +                    values.add(iter.next());
  +                }
               }
   
               Preference newPref = preferenceSetCtrl.add(pref.getName(), values);