avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pro...@apache.org
Subject cvs commit: avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util ContextManager.java
Date Thu, 12 Jun 2003 15:19:21 GMT
proyal      2003/06/12 08:19:21

  Modified:    fortress/src/java/org/apache/avalon/fortress/util
                        ContextManager.java
  Log:
  * Remove unused imports
  * Add a SourceResolver if the parent SM doesn't have one
  
  Revision  Changes    Path
  1.46      +4 -10     avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManager.java,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- ContextManager.java	11 Jun 2003 19:14:42 -0000	1.45
  +++ ContextManager.java	12 Jun 2003 15:19:21 -0000	1.46
  @@ -68,7 +68,6 @@
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.DefaultContext;
   import org.apache.avalon.framework.logger.ConsoleLogger;
  -import org.apache.avalon.framework.logger.LogKitLogger;
   import org.apache.avalon.framework.logger.Logger;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.avalon.framework.service.DefaultServiceManager;
  @@ -90,8 +89,6 @@
   import org.apache.excalibur.source.impl.ResourceSourceFactory;
   import org.apache.excalibur.source.impl.SourceResolverImpl;
   import org.apache.excalibur.source.impl.URLSourceFactory;
  -import org.apache.log.Hierarchy;
  -import org.apache.log.Priority;
   
   import java.util.ArrayList;
   import java.util.Collections;
  @@ -704,14 +701,11 @@
           final DefaultServiceManager manager = new EAServiceManager( parent, getLogger().getChildLogger("compat")
);
   
           /**
  -         * We assume that if there is a parent ServiceManager provided,
  -         * there is a SourceResolver mounted there. And if there
  -         * is none, then it is the true caller's intetion.
  -         * However it is hard to imagine how that could be usefull
  -         * except for testing purposes.
  +         * If there is a parent ServiceManager, we need to see if it has a SourceResolver,
  +         * and if not, make sure that one is available to fortress
            */
   
  -        if ( parent == null )
  +        if ( parent == null || !parent.hasService( SourceResolver.ROLE ) )
           {
               manager.put( SourceResolver.ROLE, m_defaultSourceResolver );
           }
  
  
  

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


Mime
View raw message