portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r393926 - /portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
Date Thu, 13 Apr 2006 20:46:14 GMT
Author: ate
Date: Thu Apr 13 13:46:12 2006
New Revision: 393926

URL: http://svn.apache.org/viewcvs?rev=393926&view=rev
Log:
Correcting fix for JS2-315 which always leads to an IllegalArgumentException when a PortletDefinition
isn't found.
See: http://issues.us.apache.org/jira/browse/JS2-315

Modified:
    portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java

Modified: portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java?rev=393926&r1=393925&r2=393926&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/components/portletentity/PortletEntityImpl.java
Thu Apr 13 13:46:12 2006
@@ -207,7 +207,17 @@
         // (becuase the PortletApplication has yet to be registered).
         if(this.portletDefinition == null)
         {
-            setPortletDefinition(registry.getPortletDefinitionByIdentifier(getPortletUniqueName()));
+            PortletDefinition pd = registry.getPortletDefinitionByIdentifier(getPortletUniqueName());
+            if ( pd != null )
+            {
+              // only store a really found PortletDefinition
+              // to prevent an IllegalArgumentException to be thrown
+              setPortletDefinition(pd);
+            }
+            else
+            {
+                return null;
+            }
         }        
         
         // Wrap the portlet defintion every request



---------------------------------------------------------------------
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