Return-Path: Delivered-To: apmail-jakarta-avalon-cvs-archive@apache.org Received: (qmail 30767 invoked from network); 20 Feb 2002 15:41:11 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 20 Feb 2002 15:41:11 -0000 Received: (qmail 2972 invoked by uid 97); 20 Feb 2002 15:41:11 -0000 Delivered-To: qmlist-jakarta-archive-avalon-cvs@jakarta.apache.org Received: (qmail 2956 invoked by uid 97); 20 Feb 2002 15:41:10 -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 2945 invoked by uid 97); 20 Feb 2002 15:41:10 -0000 Date: 20 Feb 2002 15:41:06 -0000 Message-ID: <20020220154106.38985.qmail@icarus.apache.org> From: leif@apache.org To: jakarta-avalon-excalibur-cvs@apache.org Subject: cvs commit: jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/testcase LatchedThreadGroup.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 leif 02/02/20 07:41:06 Modified: src/java/org/apache/avalon/excalibur/testcase LatchedThreadGroup.java Log: Workaround a strange compiler bug which shows its ugly head under javac (JDK 1.3) but not under jikes. Revision Changes Path 1.2 +15 -4 jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/testcase/LatchedThreadGroup.java Index: LatchedThreadGroup.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/testcase/LatchedThreadGroup.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LatchedThreadGroup.java 12 Feb 2002 06:15:26 -0000 1.1 +++ LatchedThreadGroup.java 20 Feb 2002 15:41:05 -0000 1.2 @@ -12,6 +12,7 @@ import org.apache.avalon.excalibur.testcase.CascadingAssertionFailedError; import org.apache.avalon.framework.logger.AbstractLogEnabled; +import org.apache.avalon.framework.logger.Logger; /** * This class is useful for writing MultiThreaded test cases where you need to perform @@ -23,7 +24,7 @@ * Runnables have completed. * * @author Leif Mortenson - * @version $Id: LatchedThreadGroup.java,v 1.1 2002/02/12 06:15:26 leif Exp $ + * @version $Id: LatchedThreadGroup.java,v 1.2 2002/02/20 15:41:05 leif Exp $ */ public class LatchedThreadGroup extends AbstractLogEnabled @@ -140,6 +141,16 @@ return duration; } + /** + * Inner access method to getLogger() to work around a bug in the Javac compiler + * when getLogger() is called from the method of an inner class. Jikes seems to + * handle it Ok. :-/ + */ + private Logger getInnerLogger() + { + return getLogger(); + } + /*--------------------------------------------------------------- * Inner Classes *-------------------------------------------------------------*/ @@ -161,7 +172,7 @@ synchronized(m_semaphore) { m_startedCount++; - getLogger().debug( "Started " + m_startedCount + " test threads." ); + getInnerLogger().debug( "Started " + m_startedCount + " test threads." ); if ( m_startedCount >= m_threads.length ) { m_semaphore.notifyAll(); @@ -185,7 +196,7 @@ { synchronized(m_semaphore) { - getLogger().error( "Error in " + Thread.currentThread().getName(), t ); + getInnerLogger().error( "Error in " + Thread.currentThread().getName(), t ); if ( m_exception != null ) { m_exception = t; @@ -199,7 +210,7 @@ synchronized(m_semaphore) { m_completedCount++; - getLogger().debug( m_completedCount + " test threads completed." ); + getInnerLogger().debug( m_completedCount + " test threads completed." ); m_semaphore.notifyAll(); } } -- To unsubscribe, e-mail: For additional commands, e-mail: