You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by an...@apache.org on 2003/07/03 22:56:16 UTC
cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/unix Chgrp.java AbstractAccessTask.java Chown.java
antoine 2003/07/03 13:56:16
Modified: src/main/org/apache/tools/ant/taskdefs/optional/unix
Chgrp.java AbstractAccessTask.java Chown.java
Log:
checkstyle fixes
PR: 21319
Submitted by: Patrick G. Heck (gus dot heck at olin dot edu)
Revision Changes Path
1.3 +12 -6 ant/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chgrp.java
Index: Chgrp.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chgrp.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Chgrp.java 10 Feb 2003 14:14:28 -0000 1.2
+++ Chgrp.java 3 Jul 2003 20:56:15 -0000 1.3
@@ -70,7 +70,7 @@
/**
* Chgrp equivalent for unix-like environments.
*
- * @author Patrick G. Heck
+ * @author Patrick G. Heck
* <a href="mailto:gus.heck@olin.edu">gus.heck@olin.edu</a>
*
* @since Ant 1.6
@@ -98,20 +98,26 @@
haveGroup = true;
}
+ /**
+ * Ensure that all the required arguments and other conditions have
+ * been set.
+ */
protected void checkConfiguration() {
if (!haveGroup) {
- throw new BuildException("Required attribute group not set in "+
- "chgrp", getLocation());
+ throw new BuildException("Required attribute group not set in "
+ + "chgrp", getLocation());
}
super.checkConfiguration();
}
/**
* We don't want to expose the executable atribute, so overide it.
+ *
+ * @param e User supplied executable that we won't accept.
*/
public void setExecutable(String e) {
- throw new BuildException(taskType +
- " doesn\'t support the executable attribute",
- getLocation());
+ throw new BuildException(taskType
+ + " doesn\'t support the executable"
+ + " attribute", getLocation());
}
}
1.7 +21 -4 ant/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java
Index: AbstractAccessTask.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AbstractAccessTask.java 23 May 2003 13:40:37 -0000 1.6
+++ AbstractAccessTask.java 3 Jul 2003 20:56:15 -0000 1.7
@@ -73,12 +73,14 @@
import org.apache.tools.ant.types.FileSet;
/**
- * @author Patrick G. Heck <a href="mailto:gus.heck@olin.edu">gus.heck@olin.edu</a>
+ * @author Patrick G. Heck
+ * <a href="mailto:gus.heck@olin.edu">gus.heck@olin.edu</a>
* @since Ant 1.6
*
* @ant.task category="filesystem"
*/
-public abstract class AbstractAccessTask
+
+public abstract class AbstractAccessTask
extends org.apache.tools.ant.taskdefs.ExecuteOn {
/**
@@ -89,6 +91,9 @@
super.setSkipEmptyFilesets(true);
}
+ /**
+ * Set the file which should have its access attributes modified.
+ */
public void setFile(File src) {
FileSet fs = new FileSet();
fs.setFile(src);
@@ -96,16 +101,22 @@
}
/**
+ * Prevent the user from specifying a different command.
+ *
* @ant.attribute ignore="true"
+ * @param cmdl A user supplied command line that we won't accept.
*/
public void setCommand(Commandline cmdl) {
- throw new BuildException(taskType +
- " doesn\'t support the command attribute",
+ throw new BuildException(taskType
+ + " doesn\'t support the command attribute",
getLocation());
}
/**
+ * Prevent the skipping of empty filesets
+ *
* @ant.attribute ignore="true"
+ * @param skip A user supplied boolean we won't accept.
*/
public void setSkipEmptyFilesets(boolean skip) {
throw new BuildException(taskType + " doesn\'t support the "
@@ -114,13 +125,19 @@
}
/**
+ * Prevent the use of the addsourcefile atribute.
+ *
* @ant.attribute ignore="true"
+ * @param b A user supplied boolean we won't accept.
*/
public void setAddsourcefile(boolean b) {
throw new BuildException(getTaskType()
+ " doesn\'t support the addsourcefile attribute", getLocation());
}
+ /**
+ * Automatically approve Unix OS's.
+ */
protected boolean isValidOs() {
return Os.isFamily("unix") && super.isValidOs();
}
1.4 +12 -6 ant/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java
Index: Chown.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Chown.java 10 Feb 2003 14:14:28 -0000 1.3
+++ Chown.java 3 Jul 2003 20:56:15 -0000 1.4
@@ -70,7 +70,7 @@
/**
* Chown equivalent for unix-like environments.
*
- * @author Patrick G. Heck
+ * @author Patrick G. Heck
* <a href="mailto:gus.heck@olin.edu">gus.heck@olin.edu</a>
*
* @since Ant 1.6
@@ -98,20 +98,26 @@
haveOwner = true;
}
+ /**
+ * Ensure that all the required arguments and other conditions have
+ * been set.
+ */
protected void checkConfiguration() {
if (!haveOwner) {
- throw new BuildException("Required attribute owner not set in" +
- " chown", getLocation());
+ throw new BuildException("Required attribute owner not set in"
+ + " chown", getLocation());
}
super.checkConfiguration();
}
/**
* We don't want to expose the executable atribute, so overide it.
+ *
+ * @param e User supplied executable that we won't accept.
*/
public void setExecutable(String e) {
- throw new BuildException(taskType +
- " doesn\'t support the executable attribute",
- getLocation());
+ throw new BuildException(taskType
+ + " doesn\'t support the executable"
+ + " attribute", getLocation());
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org