peterreilly 2005/01/06 03:55:03
Modified: src/main/org/apache/tools/ant/taskdefs Sync.java
Log:
remove imports, change _copy to myCopy
Obtained from: Kevin Jackson
Revision Changes Path
1.17 +20 -24 ant/src/main/org/apache/tools/ant/taskdefs/Sync.java
Index: Sync.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Sync.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Sync.java 22 Nov 2004 09:23:28 -0000 1.16
+++ Sync.java 6 Jan 2005 11:55:03 -0000 1.17
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2004 The Apache Software Foundation
+ * Copyright 2003-2005 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@
import java.io.File;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
import org.apache.tools.ant.BuildException;
@@ -34,9 +33,6 @@
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.types.PatternSet;
-import org.apache.tools.ant.util.FileNameMapper;
-import org.apache.tools.ant.util.IdentityMapper;
/**
* Synchronize a local target directory from the files defined
@@ -57,19 +53,19 @@
public class Sync extends Task {
// Same as regular <copy> task... see at end-of-file!
- private MyCopy _copy;
+ private MyCopy myCopy;
// Override Task#init
public void init()
throws BuildException {
// Instantiate it
- _copy = new MyCopy();
- configureTask(_copy);
+ myCopy = new MyCopy();
+ configureTask(myCopy);
// Default config of <mycopy> for our purposes.
- _copy.setFiltering(false);
- _copy.setIncludeEmptyDirs(false);
- _copy.setPreserveLastModified(true);
+ myCopy.setFiltering(false);
+ myCopy.setIncludeEmptyDirs(false);
+ myCopy.setPreserveLastModified(true);
}
private void configureTask(Task helper) {
@@ -83,10 +79,10 @@
public void execute()
throws BuildException {
// The destination of the files to copy
- File toDir = _copy.getToDir();
+ File toDir = myCopy.getToDir();
// The complete list of files to copy
- Set allFiles = _copy.nonOrphans;
+ Set allFiles = myCopy.nonOrphans;
// If the destination directory didn't already exist,
// or was empty, then no previous file removal is necessary!
@@ -94,7 +90,7 @@
// Copy all the necessary out-of-date files
log("PASS#1: Copying files to " + toDir, Project.MSG_DEBUG);
- _copy.execute();
+ myCopy.execute();
// Do we need to perform further processing?
if (noRemovalNecessary) {
@@ -109,7 +105,7 @@
logRemovedCount(removedFileCount[1], "dangling file", "", "s");
// Get rid of empty directories on the destination side
- if (!_copy.getIncludeEmptyDirs()) {
+ if (!myCopy.getIncludeEmptyDirs()) {
log("PASS#3: Removing empty directories from " + toDir,
Project.MSG_DEBUG);
int removedDirCount = removeEmptyDirectories(toDir, false);
@@ -119,7 +115,7 @@
private void logRemovedCount(int count, String prefix,
String singularSuffix, String pluralSuffix)
{
- File toDir = _copy.getToDir();
+ File toDir = myCopy.getToDir();
String what = (prefix == null) ? "" : prefix;
what += (count < 2) ? singularSuffix : pluralSuffix;
@@ -230,28 +226,28 @@
* Sets the destination directory.
*/
public void setTodir(File destDir) {
- _copy.setTodir(destDir);
+ myCopy.setTodir(destDir);
}
/**
* Used to force listing of all names of copied files.
*/
public void setVerbose(boolean verbose) {
- _copy.setVerbose(verbose);
+ myCopy.setVerbose(verbose);
}
/**
* Overwrite any existing destination file(s).
*/
public void setOverwrite(boolean overwrite) {
- _copy.setOverwrite(overwrite);
+ myCopy.setOverwrite(overwrite);
}
/**
* Used to copy empty directories.
*/
public void setIncludeEmptyDirs(boolean includeEmpty) {
- _copy.setIncludeEmptyDirs(includeEmpty);
+ myCopy.setIncludeEmptyDirs(includeEmpty);
}
/**
@@ -259,14 +255,14 @@
* @param failonerror true or false
*/
public void setFailOnError(boolean failonerror) {
- _copy.setFailOnError(failonerror);
+ myCopy.setFailOnError(failonerror);
}
/**
* Adds a set of files to copy.
*/
public void addFileset(FileSet set) {
- _copy.addFileset(set);
+ myCopy.addFileset(set);
}
/**
@@ -278,7 +274,7 @@
* @since Ant 1.6.2
*/
public void setGranularity(long granularity) {
- _copy.setGranularity(granularity);
+ myCopy.setGranularity(granularity);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]