ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: AW: svn commit: r419538 - in /ant/core/trunk/src/testcases/org/apache/tools/ant: taskdefs/optional/jdepend/JDependTest.java types/selectors/ModifiedSelectorTest.java
Date Fri, 07 Jul 2006 09:09:57 GMT
Jan.Materne@rzf.fin-nrw.de wrote:
>> But the (no more present) method was empty, which is also not right. 
>> We could 
>> 1.  make oata.BuildFileTest.tearDown() public 
>> 2.  write the ModifiedSelectorTest.BFT.tearDown() with super-call.
>>
>> I would prefer the first one, but are there any reasons for 
>> that method being protected?

> 
> Just did a test with 1. - there are some other child classes infected:
>    "... cannot override tearDown() in
> org.apache.tools.ant.BuildFileTest; 
>    attempting to assign weaker access privileges; was public"


oh bugger. Since we cannot be 100% sure who is using this stuff 
downstream, and setup/teardown gets overridden so often

I have just done (2) without the super-call, because if done properly 
we'd have to add throws Exception everywhere. Which is what ought to be 
done, both for setUp and tearDown.

I think your cleanup proposals are all valid, but we still need to think 
about who may be using ant-testutils. I have just checked the smartfrog 
ant tasks and while I used them, I hadn't overridden teardown. I had 
overridden setUp and not called super.setUp(), which I have just fixed, 
along with adding the relevant exception to the signature. But I dont 
know what other projects there are. Maybe gump will tell us.

-steve

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


Mime
View raw message