peterreilly 2005/03/11 07:16:24
Modified: src/main/org/apache/tools/ant/taskdefs ExecTask.java
ExecuteStreamHandler.java ExecuteWatchdog.java
Expand.java Filter.java GUnzip.java
GenerateKey.java JDBCTask.java
Log:
checkstyle - mostly javadoc
Revision Changes Path
1.79 +1 -0 ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
Index: ExecTask.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- ExecTask.java 18 Feb 2005 22:09:44 -0000 1.78
+++ ExecTask.java 11 Mar 2005 15:16:23 -0000 1.79
@@ -289,6 +289,7 @@
/**
* Indicates whether to attempt to resolve the executable to a
* file.
+ * @return the resolveExecutable flag
*
* @since Ant 1.6
*/
1.11 +5 -1
ant/src/main/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java
Index: ExecuteStreamHandler.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecuteStreamHandler.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ExecuteStreamHandler.java 9 Mar 2004 16:48:04 -0000 1.10
+++ ExecuteStreamHandler.java 11 Mar 2005 15:16:23 -0000 1.11
@@ -1,5 +1,5 @@
/*
- * Copyright 2000,2002,2004 The Apache Software Foundation
+ * Copyright 2000,2002,2004-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.
@@ -34,6 +34,7 @@
*
* @param os output stream to write to the standard input stream of the
* subprocess
+ * @throws IOException on error
*/
void setProcessInputStream(OutputStream os) throws IOException;
@@ -41,6 +42,7 @@
* Install a handler for the error stream of the subprocess.
*
* @param is input stream to read from the error stream from the
subprocess
+ * @throws IOException on error
*/
void setProcessErrorStream(InputStream is) throws IOException;
@@ -48,11 +50,13 @@
* Install a handler for the output stream of the subprocess.
*
* @param is input stream to read from the error stream from the
subprocess
+ * @throws IOException on error
*/
void setProcessOutputStream(InputStream is) throws IOException;
/**
* Start handling of the streams.
+ * @throws IOException on error
*/
void start() throws IOException;
1.23 +2 -1
ant/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java
Index: ExecuteWatchdog.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecuteWatchdog.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ExecuteWatchdog.java 9 Mar 2004 16:48:04 -0000 1.22
+++ ExecuteWatchdog.java 11 Mar 2005 15:16:23 -0000 1.23
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 The Apache Software Foundation
+ * Copyright 2000-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.
@@ -107,6 +107,7 @@
/**
* Called after watchdog has finished.
+ * @param w the watchdog
*/
public void timeoutOccured(Watchdog w) {
try {
1.61 +1 -1 ant/src/main/org/apache/tools/ant/taskdefs/Expand.java
Index: Expand.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Expand.java,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- Expand.java 6 Jan 2005 12:05:05 -0000 1.60
+++ Expand.java 11 Mar 2005 15:16:23 -0000 1.61
@@ -63,7 +63,7 @@
private String encoding = "UTF8";
/** Error message when more that one mapper is defined */
public static final String ERROR_MULTIPLE_MAPPERS = "Cannot define more
than one mapper";
-
+
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
/**
1.28 +9 -1 ant/src/main/org/apache/tools/ant/taskdefs/Filter.java
Index: Filter.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Filter.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- Filter.java 9 Mar 2004 16:48:04 -0000 1.27
+++ Filter.java 11 Mar 2005 15:16:24 -0000 1.28
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2004 The Apache Software Foundation
+ * Copyright 2000-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.
@@ -63,6 +63,10 @@
this.filtersFile = filtersFile;
}
+ /**
+ * Execute the task.
+ * @throws BuildException on error
+ */
public void execute() throws BuildException {
boolean isFiltersFromFile =
filtersFile != null && token == null && value == null;
@@ -84,6 +88,10 @@
}
}
+ /**
+ * Read the filters.
+ * @throws BuildException on error
+ */
protected void readFilters() throws BuildException {
log("Reading filters from " + filtersFile, Project.MSG_VERBOSE);
getProject().getGlobalFilterSet().readFiltersFromFile(filtersFile);
1.25 +8 -1 ant/src/main/org/apache/tools/ant/taskdefs/GUnzip.java
Index: GUnzip.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/GUnzip.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- GUnzip.java 9 Mar 2004 16:48:04 -0000 1.24
+++ GUnzip.java 11 Mar 2005 15:16:24 -0000 1.25
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2002,2004 The Apache Software Foundation
+ * Copyright 2000-2002,2004-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.
@@ -37,10 +37,17 @@
private static final String DEFAULT_EXTENSION = ".gz";
+ /**
+ * Get the default extension.
+ * @return the value ".gz"
+ */
protected String getDefaultExtension() {
return DEFAULT_EXTENSION;
}
+ /**
+ * Implement the gunzipping.
+ */
protected void extract() {
if (source.lastModified() > dest.lastModified()) {
log("Expanding " + source.getAbsolutePath() + " to "
1.30 +49 -0
ant/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java
Index: GenerateKey.java
===================================================================
RCS file:
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- GenerateKey.java 18 Feb 2005 23:27:59 -0000 1.29
+++ GenerateKey.java 11 Mar 2005 15:16:24 -0000 1.30
@@ -32,30 +32,57 @@
*/
public class GenerateKey extends Task {
+ /**
+ * A DistinguishedName parameter.
+ * This is a nested element in a dname nested element.
+ */
public static class DnameParam {
private String name;
private String value;
+ /**
+ * Set the name attribute.
+ * @param name a <code>String</code> value
+ */
public void setName(String name) {
this.name = name;
}
+ /**
+ * Get the name attribute.
+ * @return the name.
+ */
public String getName() {
return name;
}
+ /**
+ * Set the value attribute.
+ * @param value a <code>String</code> value
+ */
public void setValue(String value) {
this.value = value;
}
+ /**
+ * Get the value attribute.
+ * @return the value.
+ */
public String getValue() {
return value;
}
}
+ /**
+ * A class corresponding to the dname nested element.
+ */
public static class DistinguishedName {
private Vector params = new Vector();
+ /**
+ * Create a param nested element.
+ * @return a DnameParam object to be configured.
+ */
public Object createParam() {
DnameParam param = new DnameParam();
params.addElement(param);
@@ -63,10 +90,21 @@
return param;
}
+ /**
+ * Get the nested parameters.
+ * @return an enumeration of the nested parameters.
+ */
public Enumeration getParams() {
return params.elements();
}
+ /**
+ * Generate a string rep of this distinguished name.
+ * The format is each of the parameters (name = value)
+ * separated by ','.
+ * This is used on the command line.
+ * @return a string rep of this name
+ */
public String toString() {
final int size = params.size();
final StringBuffer sb = new StringBuffer();
@@ -87,6 +125,13 @@
return sb.toString();
}
+ /**
+ * Encode a name or value.
+ * The encoded result is the same as the input string
+ * except that each ',' is replaced by a '\,'.
+ * @param string the value to be encoded
+ * @return the encoded value.
+ */
public String encode(final String string) {
int end = string.indexOf(',');
@@ -264,6 +309,10 @@
this.verbose = verbose;
}
+ /**
+ * Execute the task.
+ * @throws BuildException on error
+ */
public void execute() throws BuildException {
if (null == alias) {
1.17 +18 -2 ant/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java
Index: JDBCTask.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/JDBCTask.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- JDBCTask.java 9 Mar 2004 16:48:05 -0000 1.16
+++ JDBCTask.java 11 Mar 2005 15:16:24 -0000 1.17
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2004 The Apache Software Foundation
+ * Copyright 2002-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.
@@ -151,7 +151,7 @@
* Caching loaders / driver. This is to avoid
* getting an OutOfMemoryError when calling this task
* multiple times in a row; default: true
- * @param enable
+ * @param enable a <code>boolean</code> value
*/
public void setCaching(boolean enable) {
caching = enable;
@@ -159,6 +159,7 @@
/**
* Add a path to the classpath for loading the driver.
+ * @return a path to be configured
*/
public Path createClasspath() {
if (this.classpath == null) {
@@ -170,6 +171,7 @@
/**
* Set the classpath for loading the driver
* using the classpath reference.
+ * @param r a reference to a classpath
*/
public void setClasspathRef(Reference r) {
createClasspath().setRefid(r);
@@ -228,6 +230,8 @@
/**
* Verify we are connected to the correct RDBMS
+ * @param conn the jdbc connection
+ * @return true if we are connected to the correct RDBMS
*/
protected boolean isValidRdbms(Connection conn) {
if (rdbms == null && version == null) {
@@ -268,10 +272,18 @@
return true;
}
+ /**
+ * Get the cache of loaders and drivers.
+ * @return a hashtable
+ */
protected static Hashtable getLoaderMap() {
return loaderMap;
}
+ /**
+ * Get the classloader used to create a driver.
+ * @return the classloader
+ */
protected AntClassLoader getLoader() {
return loader;
}
@@ -380,6 +392,10 @@
}
+ /**
+ * Set the caching attribute. (!)
+ * @param value a <code>boolean</code> value
+ */
public void isCaching(boolean value) {
caching = value;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]