LogFactory's Hashtable implementation (used to store LogFactoryImpl by classloader) can now be subclassed. This will default to WeakHashtable when this is present on the classpath, Hashtable otherwise. The implementation class can be specified by a system property. Based on a contribution by Brian Stansberry.
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/logging/trunk@139056 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
26
build.xml
26
build.xml
@@ -21,7 +21,7 @@
|
||||
|
||||
<!--
|
||||
"Logging" component of the Jakarta Commons Subproject
|
||||
$Id: build.xml,v 1.47 2004/11/04 22:59:02 rdonkin Exp $
|
||||
$Id: build.xml,v 1.48 2004/11/10 22:59:04 rdonkin Exp $
|
||||
-->
|
||||
|
||||
|
||||
@@ -462,7 +462,7 @@ limitations under the License.-->'>
|
||||
|
||||
|
||||
<target name="test"
|
||||
depends="log4j12-warning, compile.tests,test.jdk14,test.log4j,test.simple,test.avalon,test.log4j12"
|
||||
depends="test.alt-hashtable, log4j12-warning, compile.tests,test.jdk14,test.log4j,test.simple,test.avalon,test.log4j12"
|
||||
if="test.entry"
|
||||
description="Run all unit test cases">
|
||||
<java classname="${test.runner}" fork="yes"
|
||||
@@ -922,4 +922,26 @@ limitations under the License.-->'>
|
||||
</target>
|
||||
|
||||
|
||||
|
||||
<target name="test.alt-hashtable" depends="compile.tests"
|
||||
description="Tests for hashtable substitution">
|
||||
|
||||
<echo message="Hashtable substitution Tests"/>
|
||||
<java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
|
||||
<arg value="org.apache.commons.logging.AltHashtableTest"/>
|
||||
<classpath refid="test.classpath"/>
|
||||
<sysproperty key="org.apache.commons.logging.LogFactory.HashtableImpl"
|
||||
value="org.apache.commons.logging.AltHashtable"/>
|
||||
</java>
|
||||
|
||||
<echo message="Bad property test"/>
|
||||
<java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
|
||||
<arg value="org.apache.commons.logging.BadHashtablePropertyTest"/>
|
||||
<classpath refid="test.classpath"/>
|
||||
<sysproperty key="org.apache.commons.logging.LogFactory.HashtableImpl"
|
||||
value="org.apache.commons.logging.bad.BogusHashTable"/>
|
||||
</java>
|
||||
|
||||
</target>
|
||||
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user