[jboss-cvs] jboss-portal/federation/src/main/org/jboss/portal/federation/impl ...

Julien Viet julien at jboss.com
Mon Jul 24 06:56:36 EDT 2006


  User: julien  
  Date: 06/07/24 06:56:36

  Modified:    federation/src/main/org/jboss/portal/federation/impl 
                        FederatedPortletInvokerService.java
  Log:
  fix bug in getPortlet of federated invoker : return null and do not try to create a wrong portlet info
  
  Revision  Changes    Path
  1.2       +15 -2     jboss-portal/federation/src/main/org/jboss/portal/federation/impl/FederatedPortletInvokerService.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: FederatedPortletInvokerService.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-portal/federation/src/main/org/jboss/portal/federation/impl/FederatedPortletInvokerService.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- FederatedPortletInvokerService.java	18 Jul 2006 20:33:51 -0000	1.1
  +++ FederatedPortletInvokerService.java	24 Jul 2006 10:56:36 -0000	1.2
  @@ -39,7 +39,7 @@
   
   /**
    * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    * @since 2.4
    */
   public class FederatedPortletInvokerService implements FederatedPortletInvoker
  @@ -85,10 +85,22 @@
   
      public Portlet getPortlet(String compoundPortletId) throws IllegalArgumentException, PortletInvokerException
      {
  +      // Get portlet id
         String portletId = getPortletIdFrom(compoundPortletId);
  +
  +      // Retrieve wrapped portlet
         Portlet portlet = portletInvoker.getPortlet(portletId);
  +
  +      // Return correct result
  +      if (portlet == null)
  +      {
  +         return null;
  +      }
  +      else
  +      {
         return new FederatedPortlet(compoundPortletId, portlet);
      }
  +   }
   
      private class FederatedInstanceContext implements InstanceContext
      {
  @@ -169,3 +181,4 @@
         return compoundPortletId.substring(id.length() + 1);
      }
   }
  +                        
  \ No newline at end of file
  
  
  



More information about the jboss-cvs-commits mailing list