portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r1088877 - /portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java
Date Tue, 05 Apr 2011 03:48:29 GMT
Author: woonsan
Date: Tue Apr  5 03:48:29 2011
New Revision: 1088877

URL: http://svn.apache.org/viewvc?rev=1088877&view=rev
Log:
JS2-1247: Fixing the problem, "Caused by: java.lang.IllegalArgumentException: Init parameter:
cloneParentPortlet already defined at org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl.addInitParam(PortletDefinitionImpl.java:696)".
Init parameter should not be added twice.

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java?rev=1088877&r1=1088876&r2=1088877&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletregistry/PersistenceBrokerPortletRegistry.java
Tue Apr  5 03:48:29 2011
@@ -430,7 +430,14 @@ public class PersistenceBrokerPortletReg
                 copyDesc.setDescription(desc.getDescription());
             }
         }
-        InitParam parentPortlet = copy.addInitParam(PortletDefinition.CLONE_PARENT_INIT_PARAM);
+        
+        InitParam parentPortlet = copy.getInitParam(PortletDefinition.CLONE_PARENT_INIT_PARAM);
+        
+        if (parentPortlet == null)
+        {
+            parentPortlet = copy.addInitParam(PortletDefinition.CLONE_PARENT_INIT_PARAM);
+        }
+        
         parentPortlet.setParamValue(source.getPortletName());
 
         for (EventDefinitionReference eventDefRef : source.getSupportedProcessingEvents())



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message