diff --git a/docs/index.html b/docs/index.html
index d71c07c77..e74a0cfdb 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1244,8 +1244,8 @@ relative to the src directory.
tablength |
- The number of characters a TAB stop corresponds to.
- Default for this parameter is 8. |
+ The number of characters a TAB stop corresponds to.
+ Must be a positive power of 2, default for this parameter is 8. |
No |
diff --git a/src/main/org/apache/tools/ant/taskdefs/Cvs.java b/src/main/org/apache/tools/ant/taskdefs/Cvs.java
index a5a94b508..32f1e070b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Cvs.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Cvs.java
@@ -62,6 +62,7 @@ import java.io.*;
*
* @author costin@dnt.ro
* @author stefano@apache.org
+ * @author Wolfgang Werner wwerner@picturesafe.de
*/
public class Cvs extends Exec {
@@ -141,12 +142,12 @@ public class Cvs extends Exec {
this.command = c;
}
- public void setQuiet(String q) {
- quiet = Project.toBoolean(q);
+ public void setQuiet(boolean q) {
+ quiet = q;
}
- public void setNoexec(String ne) {
- noexec = Project.toBoolean(ne);
+ public void setNoexec(boolean ne) {
+ noexec = ne;
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
index 6866e7291..40c13e6bd 100644
--- a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
+++ b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
@@ -116,21 +116,17 @@ public class FixCRLF extends MatchingTask {
/**
* Set the source dir to find the source text files.
- *
- * @param srcDirName name of the source directory.
*/
- public void setSrcdir(String srcDirName) {
- srcDir = project.resolveFile(srcDirName);
+ public void setSrcdir(File srcDir) {
+ this.srcDir = srcDir;
}
/**
* Set the destination where the fixed files should be placed.
* Default is to replace the original file.
- *
- * @param destDirName name of the destination directory.
*/
- public void setDestdir(String destDirName) {
- destDir = project.resolveFile(destDirName);
+ public void setDestdir(File destDir) {
+ this.destDir = destDir;
}
/**
@@ -182,8 +178,12 @@ public class FixCRLF extends MatchingTask {
*
* @param tlength specify the length of tab in spaces, has to be a power of 2
*/
- public void setTablength(String tlength) {
- tablength = Integer.parseInt(tlength);
+ public void setTablength(int tlength) throws BuildException {
+ if (tlength < 2 || (tlength % 2) != 0) {
+ throw new BuildException("tablength must be a positive power of 2",
+ location);
+ }
+ tablength = tlength;
}
/**