ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/junit JUnitClassLoaderTest.java
Date Wed, 20 Feb 2002 08:15:38 GMT
On Wed, 20 Feb 2002, Stephane Bailliez <sbailliez@apache.org> wrote:

> ClassLoader cl = null;
> if (ClassLoader.getSystemResourceAsStream(testclass) != null){
>     cl = ClassLoader.getSystemClassLoader();
> } else {
>     cl = getClass().getClassLoader();
> }
> assertSame(context, cl);

will not work - the context classloader gets set to the
AntClassLoader, while getClass().getClassLoader() is the system
classloader (so cl would get the same value, in both branches).

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message