Return-Path: Delivered-To: apmail-jakarta-avalon-cvs-archive@apache.org Received: (qmail 96410 invoked from network); 2 Jul 2002 11:09:02 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 2 Jul 2002 11:09:02 -0000 Received: (qmail 15429 invoked by uid 97); 2 Jul 2002 11:08:57 -0000 Delivered-To: qmlist-jakarta-archive-avalon-cvs@jakarta.apache.org Received: (qmail 15273 invoked by uid 97); 2 Jul 2002 11:08:56 -0000 Mailing-List: contact avalon-cvs-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-cvs@jakarta.apache.org Received: (qmail 15098 invoked by uid 97); 2 Jul 2002 11:08:55 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: 2 Jul 2002 11:08:42 -0000 Message-ID: <20020702110842.36017.qmail@icarus.apache.org> From: crafterm@apache.org To: jakarta-avalon-excalibur-cvs@apache.org Subject: cvs commit: jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util ContextManager.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N crafterm 2002/07/02 04:08:42 Modified: fortress/src/java/org/apache/excalibur/fortress/util ContextManager.java Log: Removed setting of this.logger from being within a finally clause. The problem is if an exception occurs while creating the logger manager, then the call to childContext.get(LOGGER_MANAGER) in the finally block will fail, throwing an exception saying 'no container.logManager' in context. This masks the real exception that caused the problem, making debugging of the situation for the user extra hard. Revision Changes Path 1.24 +9 -11 jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java Index: ContextManager.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/util/ContextManager.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- ContextManager.java 28 Jun 2002 04:43:47 -0000 1.23 +++ ContextManager.java 2 Jul 2002 11:08:42 -0000 1.24 @@ -579,18 +579,16 @@ childContext.put( LOGGER_MANAGER, logManager ); } - finally - { - // Since we now have a LoggerManager, we can update the this.logger field - // if it is null and start logging to the "right" logger. - if( this.logger == null ) - { - getLogger().info( "Switching to default Logger provided by LoggerManager." ); + // Since we now have a LoggerManager, we can update the this.logger field + // if it is null and start logging to the "right" logger. + + if( this.logger == null ) + { + getLogger().info( "Switching to default Logger provided by LoggerManager." ); - LoggerManager loggerManager = (LoggerManager)childContext.get( LOGGER_MANAGER ); - this.logger = loggerManager.getDefaultLogger(); - } + LoggerManager loggerManager = (LoggerManager)childContext.get( LOGGER_MANAGER ); + this.logger = loggerManager.getDefaultLogger(); } } -- To unsubscribe, e-mail: For additional commands, e-mail: