avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craft...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress AbstractContainer.java
Date Fri, 28 Jun 2002 10:03:24 GMT
crafterm    2002/06/28 03:03:24

  Modified:    fortress/src/java/org/apache/excalibur/fortress
                        AbstractContainer.java
  Log:
  Added check to prevent a component/service manager from being created with
  a null parent (fixes an NPE thrown later on).
  
  Revision  Changes    Path
  1.44      +9 -5      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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- AbstractContainer.java	28 Jun 2002 04:50:17 -0000	1.43
  +++ AbstractContainer.java	28 Jun 2002 10:03:24 -0000	1.44
  @@ -506,9 +506,11 @@
        */
       protected final ComponentManager getComponentManager()
       {
  +        if ( m_componentManager == null && m_serviceManager == null )
  +            return new FortressComponentManager( this );
           return m_componentManager == null ?
  -          new FortressComponentManager( this, m_serviceManager ) :
  -          new FortressComponentManager( this, m_componentManager );
  +            new FortressComponentManager( this, m_serviceManager ) :
  +            new FortressComponentManager( this, m_componentManager );
       }
   
       /**
  @@ -519,9 +521,11 @@
        */
       protected final ServiceManager getServiceManager()
       {
  +        if ( m_componentManager == null && m_serviceManager == null )
  +            return new FortressServiceManager( this );
           return m_serviceManager == null ?
  -          new FortressServiceManager( this, m_componentManager ) :
  -          new FortressServiceManager( this, m_serviceManager );
  +            new FortressServiceManager( this, m_componentManager ) :
  +            new FortressServiceManager( this, m_serviceManager );
       }
   
       /**
  
  
  

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