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/src/scratchpad/org/apache/avalon/excalibur/system ContainerManager.java
Date Tue, 05 Feb 2002 19:04:46 GMT
bloritsch    02/02/05 11:04:46

  Modified:    src/scratchpad/org/apache/avalon/excalibur/system
                        ContainerManager.java
  Log:
  fix bad checks, and make assigning of EMPTY_CONFIG not dependant on logger priority
  
  Revision  Changes    Path
  1.14      +20 -14    jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/ContainerManager.java
  
  Index: ContainerManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/ContainerManager.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ContainerManager.java	5 Feb 2002 18:43:15 -0000	1.13
  +++ ContainerManager.java	5 Feb 2002 19:04:46 -0000	1.14
  @@ -116,7 +116,7 @@
    * </table>
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.13 $ $Date: 2002/02/05 18:43:15 $
  + * @version CVS $Revision: 1.14 $ $Date: 2002/02/05 19:04:46 $
    */
   public class ContainerManager
   {
  @@ -472,8 +472,9 @@
                   if ( getLogger().isWarnEnabled() )
                   {
                       getLogger().warn("Could not read configuration file: " + configFile,
e);
  -                    m_containerConfig = EMPTY_CONFIG;
                   }
  +
  +                m_containerConfig = EMPTY_CONFIG;
               }
           }
   
  @@ -485,7 +486,7 @@
        */
       protected Configuration getRoleConfig()
       {
  -        if ( null == m_containerConfig )
  +        if ( null == m_roleConfig )
           {
               String configFile = m_initialParameters.getParameter( ROLE_CONFIG, "" );
   
  @@ -498,8 +499,9 @@
                   if ( getLogger().isWarnEnabled() )
                   {
                       getLogger().warn("Could not read configuration file: " + configFile,
e);
  -                    m_roleConfig = EMPTY_CONFIG;
                   }
  +
  +                m_roleConfig = EMPTY_CONFIG;
               }
           }
   
  @@ -511,23 +513,27 @@
        */
       protected Configuration getLogKitConfig()
       {
  -        if ( null == m_containerConfig )
  +        if ( null == m_logKitConfig )
           {
               String configFile = m_initialParameters.getParameter( LOGKIT_CONFIG, "" );
   
               if ( "".equals( configFile.trim() ) )
               {
  -                return EMPTY_CONFIG;
  -            }
  -
  -            try
  -            {
  -                m_logKitConfig = m_configBuilder.buildFromFile( configFile );
  +                m_logKitConfig = EMPTY_CONFIG;
               }
  -            catch (Exception e)
  +            else
               {
  -                // This needs to be considered a fatal exception
  -                throw new CascadingRuntimeException( "Could not load config file for LogKitConfig.",
e );
  +                try
  +                {
  +                    m_logKitConfig = m_configBuilder.buildFromFile( configFile );
  +                }
  +                catch (Exception e)
  +                {
  +                    m_logKitConfig = EMPTY_CONFIG;
  +                    // We cannot log the exception as the logger has not been set up.
  +                    throw new CascadingRuntimeException(
  +                            "Could not load config file for LogKitConfig.", e );
  +                }
               }
           }
   
  
  
  

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