[jboss-cvs] JBossAS SVN: r58499 - projects/test/trunk/test/src/main/org/jboss/test
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 17 12:37:33 EST 2006
Author: scott.stark at jboss.org
Date: 2006-11-17 12:37:31 -0500 (Fri, 17 Nov 2006)
New Revision: 58499
Modified:
projects/test/trunk/test/src/main/org/jboss/test/JBossTestCase.java
Log:
Override the getLog() to allow subclasses which access the log prior to setUp (initializing log ivars) to function.
Modified: projects/test/trunk/test/src/main/org/jboss/test/JBossTestCase.java
===================================================================
--- projects/test/trunk/test/src/main/org/jboss/test/JBossTestCase.java 2006-11-17 17:26:15 UTC (rev 58498)
+++ projects/test/trunk/test/src/main/org/jboss/test/JBossTestCase.java 2006-11-17 17:37:31 UTC (rev 58499)
@@ -105,6 +105,25 @@
delegate.tearDown();
}
+ /**
+ * Overriden to restore the old behavior where the log was initialized post ctor rather
+ * than post setUp.
+ */
+ @Override
+ public Logger getLog()
+ {
+ Logger theLog;
+ if( delegate == null )
+ {
+ theLog = Logger.getLogger(getClass());
+ }
+ else
+ {
+ theLog = super.getLog();
+ }
+ return theLog;
+ }
+
public void resetDelegate()
{
try
More information about the jboss-cvs-commits
mailing list