ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gle...@ca.ibm.com
Subject Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant /taskdefs Copydir.java
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 ant-dev@jakarta.apache.org

To:        ant-dev@jakarta.apache.org
cc:
Subject:        Re: cvs commit:
jakarta-ant/src/main/org/apache/tools/ant/taskdefs Copydir.java

>>>>> "DM" == David Maclean <david@cm.co.za> 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.

Stefan




Mime
View raw message