ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant /taskdefs
Date Wed, 05 Jul 2000 12:52:27 GMT

I'm with Stefan on this one.  I'm not a big fan of "candy machine"
interfaces that depend on a flag to control behaviour.  The name copyFile
implies that its job is to copy a file, not to check if the new file
already exists and should only be overwritten if the original file is
newer.  If you want that behaviour, create a copyFileIfNewer method that
has the same signature, does the appropriate checking, then calls copyFile.
Its cleaner and keeps the intent of the method clear.

Glenn McAllister
TID - Software Developer - VisualAge for Java
IBM Toronto Lab, (416) 448-3805
"An approximate answer to the right question is better than the
right answer to the wrong question." - John W. Tukey

Please respond to

Subject:        Re: cvs commit:

>>>>> "DM" == David Maclean <> writes:

 DM> Can it not be conditional depending on the parameter to copyFile
DM> (a boolean) so that tasks that want to make use of that feature
DM> may do so (e.g. Rmic) rather that duplicating the code in lots of
DM> tasks. The default is to ignore the check.

This is what I've done with my patch 8^), just with the check on by
default as this is the behavior we had before.


View raw message