Compare: (<)D:\dl\jakarta-ant-1.3\src\main\org\apache\tools\ant\Project.java (39529 bytes)
   with: (>)D:\ant\src\org\apache\tools\ant\Project.java (41558 bytes)

695,696c695,699
<      * Convienence method to copy a file from a source to a destination.
<      * No filtering is performed.
---
>      * Convienence method to copy a file from a source to a
>      * destination specifying if token filtering must be used, if
>      * source files may overwrite newer destination files and the
>      * last modified time of <code>destFile</code> file should be made equal
>      * to the last modified time of <code>sourceFile</code>.
700,701c703,708
<     public void copyFile(File sourceFile, File destFile) throws IOException {
<         copyFile(sourceFile, destFile, false);
---
>     public void copyFile(String sourceFile, String destFile, boolean filtering,
>                          boolean overwrite, boolean preserveLastModified, 
>                          boolean substituteProperties)
>         throws IOException {
>         copyFile(new File(sourceFile), new File(destFile), filtering, 
>                  overwrite, preserveLastModified, substituteProperties);
705,706c712,713
<      * Convienence method to copy a file from a source to a destination
<      * specifying if token filtering must be used.
---
>      * Convienence method to copy a file from a source to a destination.
>      * No filtering is performed.
710,712c717,718
<     public void copyFile(File sourceFile, File destFile, boolean filtering)
<         throws IOException {
<         copyFile(sourceFile, destFile, filtering, false);
---
>     public void copyFile(File sourceFile, File destFile) throws IOException {
>         copyFile(sourceFile, destFile, false);
716,718c722,723
<      * Convienence method to copy a file from a source to a
<      * destination specifying if token filtering must be used and if
<      * source files may overwrite newer destination files.
---
>      * Convienence method to copy a file from a source to a destination
>      * specifying if token filtering must be used.
722,724c727,729
<     public void copyFile(File sourceFile, File destFile, boolean filtering,
<                          boolean overwrite) throws IOException {
<         copyFile(sourceFile, destFile, filtering, overwrite, false);
---
>     public void copyFile(File sourceFile, File destFile, boolean filtering)
>         throws IOException {
>         copyFile(sourceFile, destFile, filtering, false);
729,732c734,735
<      * destination specifying if token filtering must be used, if
<      * source files may overwrite newer destination files and the
<      * last modified time of <code>destFile</code> file should be made equal
<      * to the last modified time of <code>sourceFile</code>.
---
>      * destination specifying if token filtering must be used and if
>      * source files may overwrite newer destination files.
737c740,771
<                          boolean overwrite, boolean preserveLastModified)
---
>                          boolean overwrite) throws IOException {
>         copyFile(sourceFile, destFile, filtering, overwrite, false);
>     }
> 
>     /**
>      * Convienence method to copy a file from a source to a
>      * destination specifying if token filtering must be used, if
>      * source files may overwrite newer destination files and the
>      * last modified time of <code>destFile</code> file should be made equal
>      * to the last modified time of <code>sourceFile</code>.
>      *
>      * @throws IOException 
>      */
>     public void copyFile(File sourceFile, File destFile, boolean filtering,
>                          boolean overwrite, boolean preserveLastModified) 
>         throws IOException{
>         copyFile(sourceFile, destFile, filtering, overwrite, 
>                         preserveLastModified, false);
>     }
>     
>     /**
>      * Convienence method to copy a file from a source to a
>      * destination specifying if token filtering must be used, if
>      * source files may overwrite newer destination files and the
>      * last modified time of <code>destFile</code> file should be made equal
>      * to the last modified time of <code>sourceFile</code>.
>      *
>      * @throws IOException 
>      */
>     public void copyFile(File sourceFile, File destFile, boolean filtering,
>                          boolean overwrite, boolean preserveLastModified, 
>                          boolean substituteProperties)
763c797
<                         newline = replace(line, filters);
---
>                         newline = replace(line, filters, substituteProperties);
841,877c875
<         int index = s.indexOf(TOKEN_START);
< 
<         if (index > -1) {
<             try {
<                 StringBuffer b = new StringBuffer();
<                 int i = 0;
<                 String token = null;
<                 String value = null;
< 
<                 do {
<                     int endIndex = s.indexOf(TOKEN_END, 
<                                              index + TOKEN_START.length() + 1);
<                     if (endIndex == -1) {
<                         break;
<                     }
<                     token = s.substring(index + TOKEN_START.length(), endIndex);
<                     b.append(s.substring(i, index));
<                     if (tokens.containsKey(token)) {
<                         value = (String) tokens.get(token);
<                         log("Replacing: " + TOKEN_START + token + TOKEN_END + " -> " + value, MSG_VERBOSE);
<                         b.append(value);
<                         i = index + TOKEN_START.length() + token.length() + TOKEN_END.length();
<                     } else {
<                         // just append TOKEN_START and search further
<                         b.append(TOKEN_START);
<                         i = index + TOKEN_START.length();
<                     }
<                 } while ((index = s.indexOf(TOKEN_START, i)) > -1);
< 
<                 b.append(s.substring(i));
<                 return b.toString();
<             } catch (StringIndexOutOfBoundsException e) {
<                 return s;
<             }
<         } else {
<             return s;
<         }
---
>         return replace(s, tokens, false);
881,903c879,923
<      * returns the boolean equivalent of a string, which is considered true
<      * if either "on", "true", or "yes" is found, ignoring case.
<      */
<     public static boolean toBoolean(String s) {
<         return (s.equalsIgnoreCase("on") ||
<                 s.equalsIgnoreCase("true") ||
<                 s.equalsIgnoreCase("yes"));
<     }
< 
<     // Given a string defining a target name, and a Hashtable
<     // containing the "name to Target" mapping, pick out the
<     // Target and execute it.
<     public void runTarget(Target target)
<         throws BuildException {
< 
<         try {
<             fireTargetStarted(target);
<             target.execute();
<             fireTargetFinished(target, null);
<         }
<         catch(RuntimeException exc) {
<             fireTargetFinished(target, exc);
<             throw exc;
---
>      * Does replacement on the given string using the given token table.
>      *
>      * @returns the string with the token replaced.
>      */
>     private String replace(String s, Hashtable tokens, 
>                             boolean substituteProperties) {
>         int index = s.indexOf(TOKEN_START);
> 
>         if (index > -1) {
>             try {
>                 StringBuffer b = new StringBuffer();
>                 int i = 0;
>                 String token = null;
>                 String value = null;
> 
>                 do {
>                     int endIndex = s.indexOf(TOKEN_END, 
>                                              index + TOKEN_START.length() + 1);
>                     if (endIndex == -1) {
>                         break;
>                     }
>                     token = s.substring(index + TOKEN_START.length(), endIndex);
>                     b.append(s.substring(i, index));
>                     if (tokens.containsKey(token)) {
>                         value = (String) tokens.get(token);
>                         if(substituteProperties){
>                             value = ProjectHelper.replaceProperties(this, value, getProperties());
>                         }
>                         log("Replacing: " + TOKEN_START + token + TOKEN_END + " -> " + value, MSG_VERBOSE);
>                         b.append(value);
>                         i = index + TOKEN_START.length() + token.length() + TOKEN_END.length();
>                     } else {
>                         // just append TOKEN_START and search further
>                         b.append(TOKEN_START);
>                         i = index + TOKEN_START.length();
>                     }
>                 } while ((index = s.indexOf(TOKEN_START, i)) > -1);
> 
>                 b.append(s.substring(i));
>                 return b.toString();
>             } catch (StringIndexOutOfBoundsException e) {
>                 return s;
>             }
>         } else {
>             return s;
908a928,954
>      * returns the boolean equivalent of a string, which is considered true
>      * if either "on", "true", or "yes" is found, ignoring case.
>      */
>     public static boolean toBoolean(String s) {
>         return (s.equalsIgnoreCase("on") ||
>                 s.equalsIgnoreCase("true") ||
>                 s.equalsIgnoreCase("yes"));
>     }
> 
>     // Given a string defining a target name, and a Hashtable
>     // containing the "name to Target" mapping, pick out the
>     // Target and execute it.
>     public void runTarget(Target target)
>         throws BuildException {
> 
>         try {
>             fireTargetStarted(target);
>             target.execute();
>             fireTargetFinished(target, null);
>         }
>         catch(RuntimeException exc) {
>             fireTargetFinished(target, exc);
>             throw exc;
>         }
>     }
> 
>     /**
