portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smi...@apache.org
Subject svn commit: r481361 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java
Date Fri, 01 Dec 2006 19:53:55 GMT
Author: smilek
Date: Fri Dec  1 11:53:54 2006
New Revision: 481361

URL: http://svn.apache.org/viewvc?view=rev&rev=481361
Log:
get rid of NPE when PortletDefinition cannot be obtained

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java?view=diff&rev=481361&r1=481360&r2=481361
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/layout/impl/GetPageAction.java
Fri Dec  1 11:53:54 2006
@@ -214,7 +214,7 @@
             {
                 PortletDefinition portletDef = registry.getPortletDefinitionByUniqueName(
portletName );
                 
-                if ( portletIcons != null )
+                if ( portletDef != null && portletIcons != null )
                 {
                     ParameterSet paramSet = portletDef.getInitParameterSet();
                     Parameter iconParam = paramSet.get( "portlet-icon" );
@@ -223,6 +223,10 @@
                     {
                         portletIcons.put( frag.getId(), iconParamVal );
                     }
+                }
+                else if ( portletDef == null )
+                {
+                    log.error( "GetPageAction could not obtain PortletDefinition for portlet
" + portletName );
                 }
             }
         }



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