avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon/src/java/org/apache/avalon/framework/service DefaultServiceManager.java
Date Sun, 10 Nov 2002 09:13:33 GMT
donaldp     2002/11/10 01:13:33

  Modified:    src/java/org/apache/avalon/framework/service
                        DefaultServiceManager.java
  Log:
  code reshuffle to eliminate variable.
  
  Revision  Changes    Path
  1.13      +4 -7      jakarta-avalon/src/java/org/apache/avalon/framework/service/DefaultServiceManager.java
  
  Index: DefaultServiceManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/framework/service/DefaultServiceManager.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DefaultServiceManager.java	10 Nov 2002 03:43:51 -0000	1.12
  +++ DefaultServiceManager.java	10 Nov 2002 09:13:33 -0000	1.13
  @@ -128,18 +128,15 @@
        */
       public boolean hasService( final String key )
       {
  -        boolean objectExists = false;
  -
           try
           {
  -            this.lookup( key );
  -            objectExists = true;
  +            lookup( key );
  +            return true;
           }
  -        catch( Throwable t )
  +        catch( final Throwable t )
           {
  -            // Ignore all throwables--we want a yes or no answer.
  +            return false;
           }
  -        return objectExists;
       }
   
       /**
  
  
  

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


Mime
View raw message