git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278421 13f79535-47bb-0310-9956-ffa450edef68master
@@ -45,6 +45,8 @@ public class CopyPath extends Task { | |||||
private File destDir; | private File destDir; | ||||
protected FileUtils fileUtils; | protected FileUtils fileUtils; | ||||
//TODO not read, yet in a public setter | |||||
private long granularity = 0; | private long granularity = 0; | ||||
protected boolean preserveLastModified = false; | protected boolean preserveLastModified = false; | ||||
@@ -59,7 +59,7 @@ public class Execute { | |||||
private File workingDirectory = null; | private File workingDirectory = null; | ||||
private Project project = null; | private Project project = null; | ||||
private boolean newEnvironment = false; | private boolean newEnvironment = false; | ||||
//TODO: nothing appears to read this. | |||||
//TODO: nothing appears to read this but is set using a public setter. | |||||
private boolean spawn = false; | private boolean spawn = false; | ||||
@@ -46,12 +46,6 @@ public class DirectoryIterator implements ClassFileIterator { | |||||
*/ | */ | ||||
private Enumeration currentEnum; | private Enumeration currentEnum; | ||||
/** | |||||
* The length of the root directory. This is used to remove the root | |||||
* directory from full paths. | |||||
*/ | |||||
private int rootLength; | |||||
/** | /** | ||||
* Creates a directory iterator. The directory iterator is created to | * Creates a directory iterator. The directory iterator is created to | ||||
* scan the root directory. If the changeInto flag is given, then the | * scan the root directory. If the changeInto flag is given, then the | ||||
@@ -71,12 +65,6 @@ public class DirectoryIterator implements ClassFileIterator { | |||||
enumStack = new Stack(); | enumStack = new Stack(); | ||||
if (rootDirectory.isAbsolute() || changeInto) { | |||||
rootLength = rootDirectory.getPath().length() + 1; | |||||
} else { | |||||
rootLength = 0; | |||||
} | |||||
Vector filesInRoot = getDirectoryEntries(rootDirectory); | Vector filesInRoot = getDirectoryEntries(rootDirectory); | ||||
currentEnum = filesInRoot.elements(); | currentEnum = filesInRoot.elements(); | ||||
@@ -36,7 +36,6 @@ public abstract class SSHBase extends Task implements LogListener { | |||||
private static final int SSH_PORT = 22; | private static final int SSH_PORT = 22; | ||||
private String host; | private String host; | ||||
private String keyfile; | |||||
private String knownHosts; | private String knownHosts; | ||||
private int port = SSH_PORT; | private int port = SSH_PORT; | ||||
private boolean failOnError = true; | private boolean failOnError = true; | ||||
@@ -37,8 +37,6 @@ import com.jcraft.jsch.Session; | |||||
*/ | */ | ||||
public class SSHExec extends SSHBase { | public class SSHExec extends SSHBase { | ||||
private static final int BUFFER_SIZE = 1024; | |||||
/** the command to execute via ssh */ | /** the command to execute via ssh */ | ||||
private String command = null; | private String command = null; | ||||
@@ -39,12 +39,6 @@ import java.net.URL; | |||||
public class ResourceLocation { | public class ResourceLocation { | ||||
//-- Fields ---------------------------------------------------------------- | //-- Fields ---------------------------------------------------------------- | ||||
/** | |||||
* name of the catalog entry type, as per OASIS spec. | |||||
*/ | |||||
private String name = null; | |||||
/** publicId of the dtd/entity. */ | /** publicId of the dtd/entity. */ | ||||
private String publicId = null; | private String publicId = null; | ||||
@@ -182,9 +182,6 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants { | |||||
*/ | */ | ||||
protected static final int QSORT_STACK_SIZE = 1000; | protected static final int QSORT_STACK_SIZE = 1000; | ||||
private static final int FALLBACK_QSORT_SMALL_THRESH = 10; | |||||
private static final int FALLBACK_QSORT_STACK_SIZE = 100; | |||||
/** | /** | ||||
* Knuth's increments seem to work better than Incerpi-Sedgewick | * Knuth's increments seem to work better than Incerpi-Sedgewick | ||||
* here. Possibly because the number of elems to sort is usually | * here. Possibly because the number of elems to sort is usually | ||||
@@ -94,9 +94,6 @@ public class TarEntry implements TarConstants { | |||||
/** The entry's modification time. */ | /** The entry's modification time. */ | ||||
private long modTime; | private long modTime; | ||||
/** The entry's checksum. */ | |||||
private int checkSum; | |||||
/** The entry's link flag. */ | /** The entry's link flag. */ | ||||
private byte linkFlag; | private byte linkFlag; | ||||
@@ -173,7 +170,6 @@ public class TarEntry implements TarConstants { | |||||
this.userId = 0; | this.userId = 0; | ||||
this.groupId = 0; | this.groupId = 0; | ||||
this.size = 0; | this.size = 0; | ||||
this.checkSum = 0; | |||||
this.modTime = (new Date()).getTime() / MILLIS_PER_SECOND; | this.modTime = (new Date()).getTime() / MILLIS_PER_SECOND; | ||||
this.linkName = new StringBuffer(""); | this.linkName = new StringBuffer(""); | ||||
this.userName = new StringBuffer(""); | this.userName = new StringBuffer(""); | ||||
@@ -258,7 +254,6 @@ public class TarEntry implements TarConstants { | |||||
this.size = file.length(); | this.size = file.length(); | ||||
this.modTime = file.lastModified() / MILLIS_PER_SECOND; | this.modTime = file.lastModified() / MILLIS_PER_SECOND; | ||||
this.checkSum = 0; | |||||
this.devMajor = 0; | this.devMajor = 0; | ||||
this.devMinor = 0; | this.devMinor = 0; | ||||
} | } | ||||
@@ -625,7 +620,6 @@ public class TarEntry implements TarConstants { | |||||
offset += SIZELEN; | offset += SIZELEN; | ||||
this.modTime = TarUtils.parseOctal(header, offset, MODTIMELEN); | this.modTime = TarUtils.parseOctal(header, offset, MODTIMELEN); | ||||
offset += MODTIMELEN; | offset += MODTIMELEN; | ||||
this.checkSum = (int) TarUtils.parseOctal(header, offset, CHKSUMLEN); | |||||
offset += CHKSUMLEN; | offset += CHKSUMLEN; | ||||
this.linkFlag = header[offset++]; | this.linkFlag = header[offset++]; | ||||
this.linkName = TarUtils.parseName(header, offset, NAMELEN); | this.linkName = TarUtils.parseName(header, offset, NAMELEN); | ||||
@@ -43,7 +43,6 @@ public class TarInputStream extends FilterInputStream { | |||||
protected byte[] readBuf; | protected byte[] readBuf; | ||||
protected TarBuffer buffer; | protected TarBuffer buffer; | ||||
protected TarEntry currEntry; | protected TarEntry currEntry; | ||||
private boolean v7Format; | |||||
/** | /** | ||||
* This contents of this array is not used at all in this class, | * This contents of this array is not used at all in this class, | ||||
@@ -83,7 +82,6 @@ public class TarInputStream extends FilterInputStream { | |||||
this.oneBuf = new byte[1]; | this.oneBuf = new byte[1]; | ||||
this.debug = false; | this.debug = false; | ||||
this.hasHitEOF = false; | this.hasHitEOF = false; | ||||
this.v7Format = false; | |||||
} | } | ||||
/** | /** | ||||
@@ -238,12 +236,6 @@ public class TarInputStream extends FilterInputStream { | |||||
} else { | } else { | ||||
this.currEntry = new TarEntry(headerBuf); | this.currEntry = new TarEntry(headerBuf); | ||||
if (!(headerBuf[257] == 'u' && headerBuf[258] == 's' | |||||
&& headerBuf[259] == 't' && headerBuf[260] == 'a' | |||||
&& headerBuf[261] == 'r')) { | |||||
this.v7Format = true; | |||||
} | |||||
if (this.debug) { | if (this.debug) { | ||||
System.err.println("TarInputStream: SET CURRENTRY '" | System.err.println("TarInputStream: SET CURRENTRY '" | ||||
+ this.currEntry.getName() | + this.currEntry.getName() | ||||