Browse Source

spelling and random junk

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@513823 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 18 years ago
parent
commit
d778d0a6e2
1 changed files with 12 additions and 17 deletions
  1. +12
    -17
      src/main/org/apache/tools/ant/types/ArchiveFileSet.java

+ 12
- 17
src/main/org/apache/tools/ant/types/ArchiveFileSet.java View File

@@ -30,7 +30,7 @@ import org.apache.tools.zip.UnixStat;
* context of archiving tasks.
*
* It includes a prefix attribute which is prepended to each entry in
* the output archive file as well as a fullpath ttribute. It also
* the output archive file as well as a fullpath attribute. It also
* supports Unix file permissions for files and directories.
*
* @since Ant 1.7
@@ -45,7 +45,7 @@ public abstract class ArchiveFileSet extends FileSet {
* @since Ant 1.5.2
*/
public static final int DEFAULT_DIR_MODE =
UnixStat.DIR_FLAG | UnixStat.DEFAULT_DIR_PERM;
UnixStat.DIR_FLAG | UnixStat.DEFAULT_DIR_PERM;

/**
* Default value for the filemode attribute.
@@ -103,10 +103,9 @@ public abstract class ArchiveFileSet extends FileSet {
checkAttributesAllowed();
if (src != null) {
throw new BuildException("Cannot set both dir and src attributes");
} else {
super.setDir(dir);
hasDir = true;
}
super.setDir(dir);
hasDir = true;
}

/**
@@ -178,7 +177,7 @@ public abstract class ArchiveFileSet extends FileSet {
*/
public void setPrefix(String prefix) {
checkArchiveAttributesAllowed();
if (!prefix.equals("") && !fullpath.equals("")) {
if (!"".equals(prefix) && !"".equals(fullpath)) {
throw new BuildException("Cannot set both fullpath and prefix attributes");
}
this.prefix = prefix;
@@ -204,7 +203,7 @@ public abstract class ArchiveFileSet extends FileSet {
*/
public void setFullpath(String fullpath) {
checkArchiveAttributesAllowed();
if (!prefix.equals("") && !fullpath.equals("")) {
if (!"".equals(prefix) && !"".equals(fullpath)) {
throw new BuildException("Cannot set both fullpath and prefix attributes");
}
this.fullpath = fullpath;
@@ -230,7 +229,7 @@ public abstract class ArchiveFileSet extends FileSet {

/**
* Return the DirectoryScanner associated with this FileSet.
* If the ArchiveFileSet defines a source Archive file, then a ArchiveScanner
* If the ArchiveFileSet defines a source Archive file, then an ArchiveScanner
* is returned instead.
* @param p the project to use
* @return a directory scanner
@@ -421,25 +420,21 @@ public abstract class ArchiveFileSet extends FileSet {
public Object clone() {
if (isReference()) {
return ((ArchiveFileSet) getRef(getProject())).clone();
} else {
return super.clone();
}
return super.clone();
}

/**
* for file based zipfilesets, return the same as for normal filesets
* else just return the path of the zip
* @return for file based archivefilesets, included files as a list
* For file-based archivefilesets, return the same as for normal filesets;
* else just return the path of the zip.
* @return for file based archivefilesets, included files as a list
* of semicolon-separated filenames. else just the name of the zip.
*/
public String toString() {
if (hasDir && getProject() != null) {
return super.toString();
} else if (src != null) {
return src.getName();
} else {
return null;
}
return src == null ? null : src.getName();
}

/**


Loading…
Cancel
Save