avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject cvs commit: avalon/merlin/platform/tutorials/composition/application/impl/src/java/tutorial/application Application.java
Date Sun, 14 Mar 2004 15:14:08 GMT
niclas      2004/03/14 07:14:08

  Modified:    merlin/platform/tutorials/composition/application/impl/src/java/tutorial/application
                        Application.java
  Log:
  Removed some unnecessary checks, detected by Danaiel Frey.
  
  Revision  Changes    Path
  1.4       +2 -27     avalon/merlin/platform/tutorials/composition/application/impl/src/java/tutorial/application/Application.java
  
  Index: Application.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/platform/tutorials/composition/application/impl/src/java/tutorial/application/Application.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Application.java	24 Feb 2004 22:18:23 -0000	1.3
  +++ Application.java	14 Mar 2004 15:14:08 -0000	1.4
  @@ -52,33 +52,8 @@
       {
           getLogger().info( "servicing application" );
   
  -        LocationService locator = null;
  -        Object object = manager.lookup( "locator" );
  -        if( object instanceof LocationService )
  -        {
  -            locator = (LocationService) object;
  -        }
  -        else
  -        {
  -            final String error = 
  -              "Object " + object.getClass().getName() 
  -              + " does not implement the LocatorService class.";
  -            throw new ServiceException( "locator", error );
  -        }
  -
  -        PublisherService publisher = null;
  -        object = manager.lookup( "publisher" );
  -        if( object instanceof PublisherService )
  -        {
  -            publisher = (PublisherService) object;
  -        }
  -        else
  -        {
  -            final String error = 
  -              "Object " + object.getClass().getName() 
  -              + " does not implement the PublisherService class.";
  -            throw new ServiceException( "publisher", error );
  -        }
  +        LocationService locator = (LocationService) manager.lookup( "locator" );
  +        PublisherService publisher = (PublisherService) manager.lookup( "publisher" );
   
           //
           // get the location from the locator and publish
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message