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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to