From f958e23640a2e24dea962c3d2f9b5f2a3128a832 Mon Sep 17 00:00:00 2001
From: Peter Reilly
Date: Thu, 2 Nov 2006 23:02:59 +0000
Subject: [PATCH] checkstyle
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@470587 13f79535-47bb-0310-9956-ffa450edef68
---
.../org/apache/tools/ant/taskdefs/Echo.java | 2 +-
.../org/apache/tools/ant/taskdefs/GUnzip.java | 2 +-
.../apache/tools/ant/taskdefs/Recorder.java | 20 ++++++-------
.../apache/tools/ant/taskdefs/Replace.java | 4 +--
.../apache/tools/ant/taskdefs/SQLExec.java | 13 +++++----
.../apache/tools/ant/taskdefs/SignJar.java | 26 +++++++++--------
.../org/apache/tools/ant/taskdefs/SubAnt.java | 12 ++++----
.../org/apache/tools/ant/taskdefs/Sync.java | 1 +
.../org/apache/tools/ant/taskdefs/Tar.java | 22 ++++++++------
.../org/apache/tools/ant/taskdefs/Touch.java | 2 +-
.../org/apache/tools/ant/taskdefs/Tstamp.java | 4 +--
.../org/apache/tools/ant/taskdefs/Unpack.java | 6 ++--
.../org/apache/tools/ant/taskdefs/Untar.java | 2 +-
.../apache/tools/ant/taskdefs/UpToDate.java | 8 ++---
.../apache/tools/ant/taskdefs/VerifyJar.java | 29 +++++++++----------
.../apache/tools/ant/taskdefs/WaitFor.java | 4 +--
.../org/apache/tools/ant/taskdefs/War.java | 12 ++++----
.../tools/ant/taskdefs/XSLTProcess.java | 4 ++-
.../tools/ant/taskdefs/XmlProperty.java | 8 ++---
.../org/apache/tools/ant/taskdefs/Zip.java | 2 +-
.../compilers/AptCompilerAdapter.java | 4 +--
21 files changed, 97 insertions(+), 90 deletions(-)
diff --git a/src/main/org/apache/tools/ant/taskdefs/Echo.java b/src/main/org/apache/tools/ant/taskdefs/Echo.java
index 351766434..a726b6fc2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Echo.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Echo.java
@@ -61,7 +61,7 @@ public class Echo extends Task {
Writer out = null;
try {
String filename = file.getAbsolutePath();
- if(encoding == null || encoding.length() == 0) {
+ if (encoding == null || encoding.length() == 0) {
out = new FileWriter(filename, append);
} else {
out = new BufferedWriter(
diff --git a/src/main/org/apache/tools/ant/taskdefs/GUnzip.java b/src/main/org/apache/tools/ant/taskdefs/GUnzip.java
index 88c8eb946..00ff123b2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/GUnzip.java
+++ b/src/main/org/apache/tools/ant/taskdefs/GUnzip.java
@@ -87,7 +87,7 @@ public class GUnzip extends Unpack {
* support non-file resources needs to override this method. We
* need to do so for backwards compatibility reasons since we
* can't expect subclasses to support resources.
- *
+ * @return true if this task supports non file resources.
* @since Ant 1.7
*/
protected boolean supportsNonFileResources() {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Recorder.java b/src/main/org/apache/tools/ant/taskdefs/Recorder.java
index 444df37d8..7a451a672 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Recorder.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Recorder.java
@@ -127,7 +127,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Sets the level to which this recorder entry should log to.
- *
+ * @param level the level to set.
* @see VerbosityLevelChoices
*/
public void setLoglevel(VerbosityLevelChoices level) {
@@ -224,7 +224,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Empty implementation required by SubBuildListener interface.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void buildStarted(BuildEvent event) {
@@ -232,7 +232,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Empty implementation required by SubBuildListener interface.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void subBuildStarted(BuildEvent event) {
@@ -240,7 +240,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Empty implementation required by SubBuildListener interface.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void targetStarted(BuildEvent event) {
@@ -248,7 +248,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Empty implementation required by SubBuildListener interface.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void targetFinished(BuildEvent event) {
@@ -256,7 +256,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Empty implementation required by SubBuildListener interface.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void taskStarted(BuildEvent event) {
@@ -264,7 +264,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Empty implementation required by SubBuildListener interface.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void taskFinished(BuildEvent event) {
@@ -272,7 +272,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Empty implementation required by SubBuildListener interface.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void messageLogged(BuildEvent event) {
@@ -280,7 +280,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Cleans recorder registry.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void buildFinished(BuildEvent event) {
@@ -290,7 +290,7 @@ public class Recorder extends Task implements SubBuildListener {
/**
* Cleans recorder registry, if this is the subbuild the task has
* been created in.
- *
+ * @param event ignored.
* @since Ant 1.7
*/
public void subBuildFinished(BuildEvent event) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Replace.java b/src/main/org/apache/tools/ant/taskdefs/Replace.java
index 729d53bdf..df744b7c2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Replace.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Replace.java
@@ -352,7 +352,7 @@ public class Replace extends MatchingTask {
void close() throws IOException {
reader.close();
}
-
+
/**
* Closes file but doesn't throw exception
*/
@@ -426,7 +426,7 @@ public class Replace extends MatchingTask {
void close() throws IOException {
writer.close();
}
-
+
/**
* Closes file but doesn't throw exception
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
index 2ad708406..24cf10361 100644
--- a/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
+++ b/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
@@ -150,7 +150,7 @@ public class SQLExec extends JDBCTask {
* Print SQL stats (rows affected)
*/
private boolean showtrailers = true;
-
+
/**
* Results Output file.
*/
@@ -204,7 +204,7 @@ public class SQLExec extends JDBCTask {
/**
* Enable property expansion inside nested text
*
- * @param expandProperties
+ * @param expandProperties if true expand properties.
* @since Ant 1.7
*/
public void setExpandProperties(boolean expandProperties) {
@@ -323,7 +323,7 @@ public class SQLExec extends JDBCTask {
public void setShowtrailers(boolean showtrailers) {
this.showtrailers = showtrailers;
}
-
+
/**
* Set the output file;
* optional, defaults to the Ant log.
@@ -673,7 +673,7 @@ public class SQLExec extends JDBCTask {
}
/*
- * Closes an unused connection after an error and doesn't rethrow
+ * Closes an unused connection after an error and doesn't rethrow
* a possible SQLException
* @since Ant 1.7
*/
@@ -686,7 +686,7 @@ public class SQLExec extends JDBCTask {
}
}
}
-
+
/**
* The action a task should perform on an error,
* one of "continue", "stop" and "abort"
@@ -715,7 +715,7 @@ public class SQLExec extends JDBCTask {
public void setSrc(File src) {
//there are places (in this file, and perhaps elsewhere, where it is assumed
//that null is an acceptable parameter.
- if(src!=null) {
+ if (src!=null) {
setSrcResource(new FileResource(src));
}
}
@@ -747,6 +747,7 @@ public class SQLExec extends JDBCTask {
/**
* Set the source resource.
+ * @param a the source resource collection.
* @since Ant 1.7
*/
public void addConfigured(ResourceCollection a) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/SignJar.java b/src/main/org/apache/tools/ant/taskdefs/SignJar.java
index 14a67caa7..3e8a2bc49 100644
--- a/src/main/org/apache/tools/ant/taskdefs/SignJar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/SignJar.java
@@ -112,7 +112,8 @@ public class SignJar extends AbstractJarSignerTask {
/**
* error string for unit test verification {@value}
*/
- public static final String ERROR_SIGNEDJAR_AND_PATHS = "You cannot specify the signed JAR when using paths or filesets";
+ public static final String ERROR_SIGNEDJAR_AND_PATHS
+ = "You cannot specify the signed JAR when using paths or filesets";
/**
* error string for unit test verification: {@value}
*/
@@ -120,7 +121,8 @@ public class SignJar extends AbstractJarSignerTask {
/**
* error string for unit test verification: {@value}
*/
- public static final String ERROR_MAPPER_WITHOUT_DEST = "The destDir attribute is required if a mapper is set";
+ public static final String ERROR_MAPPER_WITHOUT_DEST
+ = "The destDir attribute is required if a mapper is set";
/**
* error string for unit test verification: {@value}
*/
@@ -192,7 +194,7 @@ public class SignJar extends AbstractJarSignerTask {
* add a mapper to determine file naming policy. Only used with toDir
* processing.
*
- * @param newMapper
+ * @param newMapper the mapper to add.
* @since Ant 1.7
*/
public void add(FileNameMapper newMapper) {
@@ -222,7 +224,7 @@ public class SignJar extends AbstractJarSignerTask {
/**
*
- * @param tsaurl
+ * @param tsaurl the tsa url.
* @since Ant 1.7
*/
public void setTsaurl(String tsaurl) {
@@ -240,7 +242,7 @@ public class SignJar extends AbstractJarSignerTask {
/**
* set the alias in the keystore of the TSA to use;
- * @param tsacert
+ * @param tsacert the cert alias.
*/
public void setTsacert(String tsacert) {
this.tsacert = tsacert;
@@ -394,11 +396,11 @@ public class SignJar extends AbstractJarSignerTask {
//alias is required for signing
addValue(cmd, alias);
- log("Signing JAR: " +
- jarSource.getAbsolutePath()
- +" to " +
- targetFile.getAbsolutePath()
- + " as " + alias);
+ log("Signing JAR: "
+ + jarSource.getAbsolutePath()
+ + " to "
+ + targetFile.getAbsolutePath()
+ + " as " + alias);
cmd.execute();
@@ -412,10 +414,10 @@ public class SignJar extends AbstractJarSignerTask {
* If the tsa parameters are set, this passes them to the command.
* There is no validation of java version, as third party JDKs
* may implement this on earlier/later jarsigner implementations.
- * @param cmd
+ * @param cmd the exec task.
*/
private void addTimestampAuthorityCommands(final ExecTask cmd) {
- if(tsaurl!=null) {
+ if (tsaurl != null) {
addValue(cmd, "-tsa");
addValue(cmd, tsaurl);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/SubAnt.java b/src/main/org/apache/tools/ant/taskdefs/SubAnt.java
index 29237c1de..71336a363 100644
--- a/src/main/org/apache/tools/ant/taskdefs/SubAnt.java
+++ b/src/main/org/apache/tools/ant/taskdefs/SubAnt.java
@@ -81,8 +81,6 @@ public class SubAnt
/** the targets to call on the new project */
private Vector/**/ targets = new Vector();
-
-
/**
* Pass output sent to System.out to the new project.
@@ -282,11 +280,11 @@ public class SubAnt
ant = createAntTask(directory);
String antfilename = file.getAbsolutePath();
ant.setAntfile(antfilename);
- for (int i=0; i TarConstants.MAXSIZE) {
- throw new BuildException("Resource: " + r + " larger than " +
- TarConstants.MAXSIZE + " bytes.");
+ throw new BuildException(
+ "Resource: " + r + " larger than "
+ + TarConstants.MAXSIZE + " bytes.");
}
te.setSize(r.getSize());
// override permissions if set explicitly
@@ -480,7 +481,7 @@ public class Tar extends MatchingTask {
* Is the archive up to date in relationship to a list of files.
* @param files the files to check
* @return true if the archive is up to date.
- * @deprecated since 1.5.x.
+ * @deprecated since 1.5.x.
* use the two-arg version instead.
*/
protected boolean archiveIsUpToDate(String[] files) {
@@ -521,7 +522,7 @@ public class Tar extends MatchingTask {
* support non-file resources needs to override this method. We
* need to do so for backwards compatibility reasons since we
* can't expect subclasses to support resources.
- *
+ * @return true for this task.
* @since Ant 1.7
*/
protected boolean supportsNonFileResources() {
@@ -619,6 +620,7 @@ public class Tar extends MatchingTask {
*
* @param rc the collection containing resources to add
* @param tOut stream writing to the archive.
+ * @throws IOException on error.
* @since Ant 1.7
*/
protected void tar(ResourceCollection rc, TarOutputStream tOut)
@@ -666,6 +668,7 @@ public class Tar extends MatchingTask {
/**
* whether the given resource collection is a (subclass of)
* FileSet that only contains file system resources.
+ * @return true if the collection is a fileset.
* @since Ant 1.7
*/
protected static final boolean isFileFileSet(ResourceCollection rc) {
@@ -675,7 +678,7 @@ public class Tar extends MatchingTask {
/**
* Grabs all included files and directors from the FileSet and
* returns them as an array of (relative) file names.
- *
+ * @return a list of the filenames.
* @since Ant 1.7
*/
protected static final String[] getFileNames(FileSet fs) {
@@ -695,6 +698,7 @@ public class Tar extends MatchingTask {
* it already is a TarFileSet).
*
* @param archiveFileSet fileset to copy attributes from, may be null
+ * @return a new TarFileSet.
* @since Ant 1.7
*/
protected TarFileSet asTarFileSet(ArchiveFileSet archiveFileSet) {
@@ -715,9 +719,9 @@ public class Tar extends MatchingTask {
tfs.integerSetDirMode(archiveFileSet
.getDirMode(getProject()));
}
-
- if (archiveFileSet instanceof
- org.apache.tools.ant.types.TarFileSet) {
+
+ if (archiveFileSet
+ instanceof org.apache.tools.ant.types.TarFileSet) {
org.apache.tools.ant.types.TarFileSet t =
(org.apache.tools.ant.types.TarFileSet) archiveFileSet;
if (t.hasUserNameBeenSet()) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Touch.java b/src/main/org/apache/tools/ant/taskdefs/Touch.java
index b606d7320..61a3ac2d7 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Touch.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Touch.java
@@ -209,7 +209,7 @@ public class Touch extends Task {
/**
* Add a collection of resources to touch.
- *
+ * @param rc the collection to add.
* @since Ant 1.7
*/
public void add(ResourceCollection rc) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
index d2fb5a216..bf2f2b240 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
@@ -144,7 +144,7 @@ public class Tstamp extends Task {
/**
* The date/time pattern to be used. The values are as
* defined by the Java SimpleDateFormat class.
- * @param pattern
+ * @param pattern the pattern to use.
* @see java.text.SimpleDateFormat
*/
public void setPattern(String pattern) {
@@ -157,7 +157,7 @@ public class Tstamp extends Task {
* either variant or variant and country may be omitted.
* For more information please refer to documentation
* for the java.util.Locale class.
- * @param locale
+ * @param locale the locale to use.
* @see java.util.Locale
*/
public void setLocale(String locale) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Unpack.java b/src/main/org/apache/tools/ant/taskdefs/Unpack.java
index dfeaa71a6..9f0e65e44 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Unpack.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Unpack.java
@@ -39,7 +39,7 @@ public abstract class Unpack extends Task {
protected Resource srcResource;
/**
- * @deprecated since 1.5.x.
+ * @deprecated since 1.5.x.
* setSrc(String) is deprecated and is replaced with
* setSrc(File) to make Ant's Introspection
* mechanism do the work and also to encapsulate operations on
@@ -54,7 +54,7 @@ public abstract class Unpack extends Task {
}
/**
- * @deprecated since 1.5.x.
+ * @deprecated since 1.5.x.
* setDest(String) is deprecated and is replaced with
* setDest(File) to make Ant's Introspection
* mechanism do the work and also to encapsulate operations on
@@ -176,7 +176,7 @@ public abstract class Unpack extends Task {
* Whether this task can deal with non-file resources.
*
* This implementation returns false.
- *
+ * @return false for this task.
* @since Ant 1.7
*/
protected boolean supportsNonFileResources() {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Untar.java b/src/main/org/apache/tools/ant/taskdefs/Untar.java
index 4040eed95..f3c45ae8a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Untar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Untar.java
@@ -131,7 +131,7 @@ public class Untar extends Expand {
throws IOException {
TarInputStream tis = null;
try {
- tis =
+ tis =
new TarInputStream(compression.decompress(name,
new BufferedInputStream(stream)));
log("Expanding: " + name + " into " + dir, Project.MSG_INFO);
diff --git a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
index 42e7846ab..be14ca613 100644
--- a/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
+++ b/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
@@ -112,6 +112,7 @@ public class UpToDate extends Task implements Condition {
/**
* Nested resource collections as sources.
+ * @return the source resources to configure.
* @since Ant 1.7
*/
public Union createSrcResources() {
@@ -207,10 +208,9 @@ public class UpToDate extends Task implements Condition {
if (upToDate) {
Resource[] r = sourceResources.listResources();
- upToDate = upToDate &&
- (ResourceUtils.selectOutOfDateSources(this, r, getMapper(),
- getProject()).length
- == 0);
+ upToDate = upToDate
+ && (ResourceUtils.selectOutOfDateSources(
+ this, r, getMapper(), getProject()).length == 0);
}
return upToDate;
diff --git a/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java b/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java
index be1c8362d..1ba2d37d3 100644
--- a/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java
@@ -53,13 +53,13 @@ public class VerifyJar extends AbstractJarSignerTask {
/**
* certification flag
*/
- private boolean certificates=false;
+ private boolean certificates = false;
private BufferingOutputFilter outputCache = new BufferingOutputFilter();
public static final String ERROR_NO_VERIFY = "Failed to verify ";
/**
* Ask for certificate information to be printed
- * @param certificates
+ * @param certificates if true print certificates.
*/
public void setCertificates(boolean certificates) {
this.certificates = certificates;
@@ -67,7 +67,7 @@ public class VerifyJar extends AbstractJarSignerTask {
/**
* verify our jar files
- * @throws BuildException
+ * @throws BuildException on error.
*/
public void execute() throws BuildException {
//validation logic
@@ -101,12 +101,12 @@ public class VerifyJar extends AbstractJarSignerTask {
/**
* verify a JAR.
- * @param jar
+ * @param jar the jar to verify.
* @throws BuildException if the file could not be verified
*/
private void verifyOneJar(File jar) {
- if(!jar.exists()) {
- throw new BuildException(ERROR_NO_FILE+jar);
+ if (!jar.exists()) {
+ throw new BuildException(ERROR_NO_FILE + jar);
}
final ExecTask cmd = createJarSigner();
@@ -116,15 +116,14 @@ public class VerifyJar extends AbstractJarSignerTask {
//verify special operations
addValue(cmd, "-verify");
- if(certificates) {
+ if (certificates) {
addValue(cmd, "-certs");
}
//JAR is required
addValue(cmd, jar.getPath());
- log("Verifying JAR: " +
- jar.getAbsolutePath());
+ log("Verifying JAR: " + jar.getAbsolutePath());
outputCache.clear();
BuildException ex = null;
try {
@@ -165,7 +164,7 @@ public class VerifyJar extends AbstractJarSignerTask {
}
public void clear() {
- if(buffer!=null) {
+ if (buffer != null) {
buffer.clear();
}
}
@@ -178,17 +177,17 @@ public class VerifyJar extends AbstractJarSignerTask {
private Reader next;
- private StringBuffer buffer=new StringBuffer();
+ private StringBuffer buffer = new StringBuffer();
public BufferingOutputFilterReader(Reader next) {
this.next = next;
}
- public int read(char cbuf[], int off, int len) throws IOException {
+ public int read(char[] cbuf, int off, int len) throws IOException {
//hand down
- int result=next.read(cbuf,off,len);
+ int result = next.read(cbuf, off, len);
//cache
- buffer.append(cbuf,off,len);
+ buffer.append(cbuf, off, len);
//return
return result;
}
@@ -202,7 +201,7 @@ public class VerifyJar extends AbstractJarSignerTask {
}
public void clear() {
- buffer=new StringBuffer();
+ buffer = new StringBuffer();
}
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/WaitFor.java b/src/main/org/apache/tools/ant/taskdefs/WaitFor.java
index e520e0fd0..b88e64ae0 100644
--- a/src/main/org/apache/tools/ant/taskdefs/WaitFor.java
+++ b/src/main/org/apache/tools/ant/taskdefs/WaitFor.java
@@ -155,7 +155,7 @@ public class WaitFor extends ConditionBase {
* @since Ant1.7
*/
protected void processSuccess() {
- log(getTaskName()+": condition was met", Project.MSG_VERBOSE);
+ log(getTaskName() + ": condition was met", Project.MSG_VERBOSE);
}
/**
@@ -166,7 +166,7 @@ public class WaitFor extends ConditionBase {
* @since Ant1.7
*/
protected void processTimeout() {
- log(getTaskName() +": timeout", Project.MSG_VERBOSE);
+ log(getTaskName() + ": timeout", Project.MSG_VERBOSE);
if (timeoutProperty != null) {
getProject().setNewProperty(timeoutProperty, "true");
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/War.java b/src/main/org/apache/tools/ant/taskdefs/War.java
index 0981f55fb..9962320d0 100644
--- a/src/main/org/apache/tools/ant/taskdefs/War.java
+++ b/src/main/org/apache/tools/ant/taskdefs/War.java
@@ -55,7 +55,7 @@ public class War extends Jar {
/**
* flag set if the descriptor is added
*/
- private boolean needxmlfile=true;
+ private boolean needxmlfile = true;
private File addedWebXmlFile;
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
@@ -189,16 +189,16 @@ public class War extends Jar {
//check to see if we warn or not
if (!FILE_UTILS.fileNameEquals(addedWebXmlFile, file)) {
log("Warning: selected " + archiveType
- +" files include a second " +XML_DESCRIPTOR_PATH
+ + " files include a second " + XML_DESCRIPTOR_PATH
+ " which will be ignored.\n"
- + "The duplicate entry is at " +file +'\n'
+ + "The duplicate entry is at " + file + '\n'
+ "The file that will be used is "
+ addedWebXmlFile,
Project.MSG_WARN);
}
} else {
//no added file, yet
- addedWebXmlFile=file;
+ addedWebXmlFile = file;
//there is no web.xml file, so add it
addFile = true;
//and remember that we did
@@ -216,9 +216,9 @@ public class War extends Jar {
* gets executed.
*/
protected void cleanUp() {
- if(addedWebXmlFile==null && needxmlfile && !isInUpdateMode()) {
+ if (addedWebXmlFile == null && needxmlfile && !isInUpdateMode()) {
throw new BuildException("No WEB-INF/web.xml file was added.\n"
- +"If this is your intent, set needxml='false' ");
+ + "If this is your intent, set needxml='false' ");
}
addedWebXmlFile = null;
super.cleanUp();
diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
index d93edd440..833341c25 100644
--- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
+++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
@@ -1058,7 +1058,9 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
File file = new File(fileName);
// Give always a slash as file separator, so the stylesheet could be sure about that
// Use '.' so a dir+"/"+name would not result in an absolute path
- liaison.addParam(fileDirParameter, (file.getParent()!=null) ? file.getParent().replace('\\','/') : "." );
+ liaison.addParam(
+ fileDirParameter,
+ (file.getParent()!=null) ? file.getParent().replace('\\','/') : "." );
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java b/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java
index 86a38e49c..26d9ee361 100644
--- a/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java
+++ b/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java
@@ -282,14 +282,14 @@ public class XmlProperty extends org.apache.tools.ant.Task {
if (sxe.getException() != null) {
x = sxe.getException();
}
- throw new BuildException("Failed to load "+src,x);
+ throw new BuildException("Failed to load " + src, x);
} catch (ParserConfigurationException pce) {
// Parser with specified options can't be built
throw new BuildException(pce);
} catch (IOException ioe) {
// I/O error
- throw new BuildException("Failed to load " + src,ioe);
+ throw new BuildException("Failed to load " + src, ioe);
}
}
@@ -766,7 +766,7 @@ public class XmlProperty extends org.apache.tools.ant.Task {
*/
private File resolveFile(String fileName) {
if (rootDirectory == null) {
- return FILE_UTILS.resolveFile(getProject().getBaseDir(),fileName);
+ return FILE_UTILS.resolveFile(getProject().getBaseDir(), fileName);
}
return FILE_UTILS.resolveFile(rootDirectory, fileName);
}
@@ -779,7 +779,7 @@ public class XmlProperty extends org.apache.tools.ant.Task {
* support non-file resources needs to override this method. We
* need to do so for backwards compatibility reasons since we
* can't expect subclasses to support resources.
- *
+ * @return true for this task.
* @since Ant 1.7
*/
protected boolean supportsNonFileResources() {
diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java
index 0dce8d569..1d2afa2de 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Zip.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java
@@ -979,7 +979,7 @@ public class Zip extends MatchingTask {
*/
as = getNonFileSetResourcesToAdd(rc, zipFile, true);
}
-
+
Resource[][] toAdd = new Resource[rcs.length][];
int fsIndex = 0;
int restIndex = 0;
diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java b/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java
index f31f19999..d2b1f0f18 100644
--- a/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java
@@ -65,7 +65,7 @@ import java.util.Vector;
* exposed to end-users, because it was too brittle during beta testing; classpath
* problems being the core issue.
*
- *
+ *
*
* @since Ant 1.7
*/
@@ -156,7 +156,7 @@ public class AptCompilerAdapter extends DefaultCompilerAdapter {
/**
* Run the compilation.
- *
+ * @retrun true on success.
* @throws BuildException if the compilation has problems.
*/
public boolean execute() throws BuildException {