ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: svn commit: r518896 - /ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java
Date Fri, 16 Mar 2007 11:45:43 GMT
Kevin Jackson wrote:
> Hi Peter,
> 
>> Please rollback this change.
>> It is a misuse of reflection.
>>
> 
> Why do you say it's a mis-use of reflection - the code was duplicated
> and using reflection we can remove the duplication, keep the interface
> the same and have the same behaviour as before.  There may be a small
> amount of method-call overhead because of the use of reflection - but
> again I don't see this as a misuse
> 

1. In Java5, all these things implement Closeable so you only need one 
method.

2.  we've just the more efficient invocation for existing code

This doesnt mean it isnt a nice trick, but since the code was there, it 
may as well stay. Unless we can retrofit Closeable to the java1.3+ 
classes, which is a serious trick indeed.

-steve

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


Mime
View raw message