avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test ContainerProfile.java
Date Tue, 24 Sep 2002 21:23:00 GMT
bloritsch    2002/09/24 14:23:00

  Modified:    fortress/src/java/org/apache/excalibur/fortress
                        AbstractContainer.java
               fortress/src/test/org/apache/excalibur/fortress/test
                        ContainerProfile.java
  Log:
  update fortress to fix the remaining lookup issues
  
  Revision  Changes    Path
  1.59      +17 -10    jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/AbstractContainer.java
  
  Index: AbstractContainer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/AbstractContainer.java,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- AbstractContainer.java	23 Sep 2002 05:07:55 -0000	1.58
  +++ AbstractContainer.java	24 Sep 2002 21:22:59 -0000	1.59
  @@ -66,7 +66,6 @@
   import org.apache.avalon.framework.service.*;
   
   import org.apache.excalibur.event.Queue;
  -import org.apache.excalibur.event.command.Command;
   import org.apache.excalibur.fortress.container.commands.*;
   import org.apache.excalibur.fortress.handler.ComponentHandler;
   import org.apache.excalibur.fortress.lifecycle.LifecycleExtensionManager;
  @@ -382,23 +381,31 @@
       public boolean has( final String role, final Object hint )
       {
           final BucketMap hintMap = (BucketMap)m_mapper.get( role );
  +        boolean hasComponent = false;
   
  -        if( null == hintMap )
  +        if( null != hintMap )
           {
  -            return false;
  +            hasComponent = true;
           }
   
  -        if( null == hint )
  +        if ( hasComponent )
           {
  -            if( !hintMap.containsKey( "selector" ) )
  +            if( null == hint )
               {
  -                return hintMap.containsKey( "default" );
  -            }
  +               hasComponent = hintMap.containsKey( "selector" );
   
  -            return false;
  +                if ( ! hasComponent )
  +                {
  +                    hasComponent = hintMap.containsKey( "default" );
  +                }
  +            }
  +            else
  +            {
  +                hasComponent = hintMap.containsKey( hint );
  +            }
           }
   
  -        return hintMap.containsKey( hint );
  +        return hasComponent;
       }
   
       /**
  
  
  
  1.27      +5 -4      jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test/ContainerProfile.java
  
  Index: ContainerProfile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/test/org/apache/excalibur/fortress/test/ContainerProfile.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ContainerProfile.java	24 Sep 2002 19:40:19 -0000	1.26
  +++ ContainerProfile.java	24 Sep 2002 21:23:00 -0000	1.27
  @@ -49,7 +49,6 @@
   */
   package org.apache.excalibur.fortress.test;
   
  -import java.net.URL;
   import junit.framework.TestCase;
   import junit.textui.TestRunner;
   import org.apache.avalon.excalibur.component.ExcaliburComponentManager;
  @@ -66,11 +65,13 @@
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.logger.NullLogger;
   import org.apache.avalon.framework.service.ServiceManager;
  +import org.apache.excalibur.container.legacy.ComponentManager2ServiceManager;
   import org.apache.excalibur.fortress.ContainerManager;
   import org.apache.excalibur.fortress.DefaultContainerManager;
  -import org.apache.excalibur.fortress.util.ContextBuilder;
   import org.apache.excalibur.fortress.container.DefaultContainer;
  -import org.apache.excalibur.container.legacy.ComponentManager2ServiceManager;
  +import org.apache.excalibur.fortress.util.ContextBuilder;
  +
  +import java.net.URL;
   
   /**
    * Used as a basis for the PoolComparisonProfile Tests
  
  
  

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