" + previousRevision
+ output.println("\t\t\t" + previousRevision
+ "");
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsUser.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsUser.java
index 98bc71dac..2f5744cb8 100644
--- a/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsUser.java
+++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/CvsUser.java
@@ -112,7 +112,7 @@ public class CvsUser {
/**
* validate that this objetc is configured.
*
- * @exception BuildException if the instance has not be correctly
+ * @exception BuildException if the instance has not be correctly
* configured.
*/
void validate() throws BuildException {
diff --git a/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java b/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java
index 38588e7da..19d51f574 100644
--- a/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java
@@ -135,15 +135,15 @@ public class EmailTask
private Vector files = new Vector();
private Vector filesets = new Vector();
/** Character set for MimeMailer*/
- private String charset=null;
+ private String charset = null;
/** if set to true, the email will not be actually sent */
- private boolean debugonly=false;
+ private boolean debugonly = false;
/** a location where to print the email message */
private File debugoutput;
/** User for SMTP auth */
- private String user=null;
+ private String user = null;
/** Password for SMTP auth */
- private String password=null;
+ private String password = null;
/** indicate if the user wishes SSL-TLS */
private boolean SSL = false;
@@ -471,15 +471,18 @@ public class EmailTask
autoFound = true;
log("Using MIME mail", Project.MSG_VERBOSE);
} catch (Throwable e) {
- log("Failed to initialise MIME mail: "+e.getMessage(),Project.MSG_WARN);
+ log("Failed to initialise MIME mail: "
+ + e.getMessage(), Project.MSG_WARN);
}
}
// SMTP auth only allowed with MIME mail
- if (autoFound==false && ((user !=null) || (password != null) ) && (encoding.equals(UU) || encoding.equals(PLAIN))) {
+ if (autoFound == false && ((user != null) || (password != null))
+ && (encoding.equals(UU) || encoding.equals(PLAIN))) {
throw new BuildException("SMTP auth only possible with MIME mail");
}
// SSL only allowed with MIME mail
- if (autoFound==false && (SSL) && (encoding.equals(UU) || encoding.equals(PLAIN))) {
+ if (autoFound == false && (SSL)
+ && (encoding.equals(UU) || encoding.equals(PLAIN))) {
throw new BuildException("SSL only possible with MIME mail");
}
@@ -540,7 +543,7 @@ public class EmailTask
}
// set the character set if not done already (and required)
if (charset != null) {
- if (message.getCharset()!=null) {
+ if (message.getCharset() != null) {
throw new BuildException("The charset can only be "
+ "specified in one location");
} else {
@@ -568,7 +571,7 @@ public class EmailTask
// let the user know what's going to happen
log("Sending email: " + subject, Project.MSG_INFO);
log("From " + from, Project.MSG_VERBOSE);
- log("ReplyTo " + replyToList,Project.MSG_VERBOSE);
+ log("ReplyTo " + replyToList, Project.MSG_VERBOSE);
log("To " + toList, Project.MSG_VERBOSE);
log("Cc " + ccList, Project.MSG_VERBOSE);
log("Bcc " + bccList, Project.MSG_VERBOSE);
diff --git a/src/main/org/apache/tools/ant/taskdefs/email/Message.java b/src/main/org/apache/tools/ant/taskdefs/email/Message.java
index 2f3bb1b3f..edb28672e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/email/Message.java
+++ b/src/main/org/apache/tools/ant/taskdefs/email/Message.java
@@ -75,7 +75,7 @@ public class Message extends ProjectComponent {
private StringBuffer buffer = new StringBuffer();
private String mimeType = "text/plain";
private boolean specified = false;
- private String charset=null;
+ private String charset = null;
/** Creates a new empty message */
public Message() {
@@ -153,9 +153,9 @@ public class Message extends ProjectComponent {
throws IOException {
// We need character encoding aware printing here.
// So, using PrintWriter over OutputStreamWriter instead of PrintStream
- PrintWriter out = charset!=null?
- new PrintWriter(new OutputStreamWriter(ps,charset)):
- new PrintWriter(ps);
+ PrintWriter out
+ = charset != null ? new PrintWriter(new OutputStreamWriter(ps, charset))
+ : new PrintWriter(ps);
if (messageSource != null) {
// Read message from a file
FileReader freader = new FileReader(messageSource);
diff --git a/src/main/org/apache/tools/ant/taskdefs/email/PlainMailer.java b/src/main/org/apache/tools/ant/taskdefs/email/PlainMailer.java
index 4ddf7b0c2..2be160f55 100644
--- a/src/main/org/apache/tools/ant/taskdefs/email/PlainMailer.java
+++ b/src/main/org/apache/tools/ant/taskdefs/email/PlainMailer.java
@@ -76,7 +76,7 @@ class PlainMailer extends Mailer {
*/
public void send() {
try {
- MailMessage mailMessage = new MailMessage(host,port);
+ MailMessage mailMessage = new MailMessage(host, port);
mailMessage.from(from.toString());
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
index 2dfd784ba..5ee559708 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java
@@ -94,7 +94,7 @@ public class CCMCheck extends Continuus {
* @param v Value to assign to file.
*/
public void setFile(File v) {
- log("working file "+v, Project.MSG_VERBOSE);
+ log("working file " + v, Project.MSG_VERBOSE);
this.file = v;
}
@@ -163,9 +163,9 @@ public class CCMCheck extends Continuus {
throw new BuildException("Choose between file and fileset !");
}
- if ( getFile() !=null) {
+ if (getFile() != null) {
doit();
- return ;
+ return;
}
int sizeofFileSet = filesets.size();
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java
index 239aa9c0e..72cf1bf44 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMkbl.java
@@ -57,10 +57,6 @@ package org.apache.tools.ant.taskdefs.optional.clearcase;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
-import org.apache.tools.ant.taskdefs.optional.clearcase.*;
-
-
-
/**
* Task to CreateBaseline command to ClearCase.
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java
index a966ff73c..7f155ebfc 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklabel.java
@@ -54,7 +54,8 @@
package org.apache.tools.ant.taskdefs.optional.clearcase;
-import org.apache.tools.ant.*;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -150,7 +151,7 @@ public class CCMklabel extends ClearCase {
checkOptions(commandLine);
result = run(commandLine);
- if ( result != 0) {
+ if (result != 0) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java
index 3747622af..ab47a3edc 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCMklbtype.java
@@ -54,7 +54,8 @@
package org.apache.tools.ant.taskdefs.optional.clearcase;
-import org.apache.tools.ant.*;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -152,7 +153,7 @@ public class CCMklbtype extends ClearCase {
checkOptions(commandLine);
result = run(commandLine);
- if ( result != 0) {
+ if (result != 0) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java
index 77c905400..332876f6b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCRmtype.java
@@ -54,7 +54,8 @@
package org.apache.tools.ant.taskdefs.optional.clearcase;
-import org.apache.tools.ant.*;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.Commandline;
/**
@@ -150,7 +151,7 @@ public class CCRmtype extends ClearCase {
checkOptions(commandLine);
result = run(commandLine);
- if ( result != 0) {
+ if (result != 0) {
String msg = "Failed executing: " + commandLine.toString();
throw new BuildException(msg, location);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFile.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFile.java
index 535f68e36..e089be95c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFile.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFile.java
@@ -95,7 +95,7 @@ public class ClassFile {
DataInputStream classStream = new DataInputStream(stream);
if (classStream.readInt() != CLASS_MAGIC) {
- throw new ClassFormatError("No Magic Code Found "
+ throw new ClassFormatError("No Magic Code Found "
+ "- probably not a Java class file.");
}
@@ -112,7 +112,7 @@ public class ClassFile {
/* int accessFlags = */ classStream.readUnsignedShort();
int thisClassIndex = classStream.readUnsignedShort();
/* int superClassIndex = */ classStream.readUnsignedShort();
- ClassCPInfo classInfo
+ ClassCPInfo classInfo
= (ClassCPInfo) constantPool.getEntry(thisClassIndex);
className = classInfo.getClassName();
}
@@ -130,7 +130,7 @@ public class ClassFile {
for (int i = 0; i < constantPool.size(); ++i) {
ConstantPoolEntry entry = constantPool.getEntry(i);
- if (entry != null
+ if (entry != null
&& entry.getTag() == ConstantPoolEntry.CONSTANT_CLASS) {
ClassCPInfo classEntry = (ClassCPInfo) entry;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java
index f5c093242..31f58d2d1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java
@@ -59,7 +59,7 @@ package org.apache.tools.ant.taskdefs.optional.depend;
* file format and those commonly used in Java programming.
*
* @author Conor MacNeill
- *
+ *
*/
public class ClassFileUtils {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
index 8c10abce6..06c075b7d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
@@ -425,9 +425,9 @@ public class Depend extends MatchingTask {
String classFilePath = classURL.getFile();
classpathFileObject = new File(classFilePath);
}
- log("Class " + className +
- " depends on " + classpathFileObject +
- " due to " + dependency, Project.MSG_DEBUG);
+ log("Class " + className
+ + " depends on " + classpathFileObject
+ + " due to " + dependency, Project.MSG_DEBUG);
}
}
classpathFileCache.put(dependency, classpathFileObject);
@@ -545,8 +545,8 @@ public class Depend extends MatchingTask {
* Dump the dependency information loaded from the classes to the Ant log
*/
private void dumpDependencies() {
- log("Reverse Dependency Dump for " + affectedClassMap.size() +
- " classes:", Project.MSG_DEBUG);
+ log("Reverse Dependency Dump for " + affectedClassMap.size()
+ + " classes:", Project.MSG_DEBUG);
Enumeration classEnum = affectedClassMap.keys();
while (classEnum.hasMoreElements()) {
@@ -617,8 +617,8 @@ public class Depend extends MatchingTask {
File classpathFile = (File) e2.nextElement();
if (classpathFile.lastModified()
> info.absoluteFile.lastModified()) {
- log("Class " + className +
- " is out of date with respect to " + classpathFile, Project.MSG_DEBUG);
+ log("Class " + className
+ + " is out of date with respect to " + classpathFile, Project.MSG_DEBUG);
outOfDateClasses.put(className, className);
break;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
index d4e81209f..d97fac13d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
@@ -179,12 +179,12 @@ public class DirectoryIterator implements ClassFileIterator {
} else {
// we have a file. create a stream for it
- FileInputStream inFileStream
+ FileInputStream inFileStream
= new FileInputStream(element);
if (element.getName().endsWith(".class")) {
- // create a data input stream from the jar
+ // create a data input stream from the jar
// input stream
ClassFile javaClass = new ClassFile();
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java
index 88e3a7744..b5644bdf2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java
@@ -358,7 +358,7 @@ public class ConstantPool {
Object element = entries.elementAt(i);
if (element instanceof NameAndTypeCPInfo) {
- NameAndTypeCPInfo nameAndTypeEntry
+ NameAndTypeCPInfo nameAndTypeEntry
= (NameAndTypeCPInfo) element;
if (nameAndTypeEntry.getName().equals(name)
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
index 1c7d9a7c5..17e4dc135 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
@@ -258,21 +258,22 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exe
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) {
//choose the right vendor DD
- if ( !(version == BES || version == BAS)) {
- throw new BuildException("version "+version+" is not supported");
+ if (!(version == BES || version == BAS)) {
+ throw new BuildException("version " + version + " is not supported");
}
- String dd = ( version == BES ? BES_DD : BAS_DD);
+ String dd = (version == BES ? BES_DD : BAS_DD);
- log("vendor file : "+ddPrefix + dd,Project.MSG_DEBUG);
+ log("vendor file : " + ddPrefix + dd, Project.MSG_DEBUG);
File borlandDD = new File(getConfig().descriptorDir, ddPrefix + dd);
if (borlandDD.exists()) {
log("Borland specific file found " + borlandDD, Project.MSG_VERBOSE);
ejbFiles.put(META_DIR + dd , borlandDD);
} else {
- log("Unable to locate borland deployment descriptor. It was expected to be in " +
- borlandDD.getPath(), Project.MSG_WARN);
+ log("Unable to locate borland deployment descriptor. "
+ + "It was expected to be in "
+ + borlandDD.getPath(), Project.MSG_WARN);
return;
}
}
@@ -290,15 +291,16 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exe
* @param sourceJar java.io.File representing the produced jar file
*/
private void verifyBorlandJar(File sourceJar) {
- if ( version == BAS) {
+ if (version == BAS) {
verifyBorlandJarV4(sourceJar);
- return ;
+ return;
}
- if ( version == BES) {
+ if (version == BES) {
verifyBorlandJarV5(sourceJar);
return;
}
- log("verify jar skipped because the version is invalid ["+version+"]",Project.MSG_WARN);
+ log("verify jar skipped because the version is invalid ["
+ + version + "]", Project.MSG_WARN);
}
/**
@@ -426,8 +428,8 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exe
//no TIE classes
commandline.createArgument().setValue("-no_tie");
- if ( java2iioparams != null) {
- log("additional "+java2iioparams +" to java2iiop " ,0);
+ if (java2iioparams != null) {
+ log("additional " + java2iioparams + " to java2iiop ", 0);
commandline.createArgument().setValue(java2iioparams);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
index 89979e114..0ce3c2348 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
@@ -184,8 +184,10 @@ public class BorlandGenerateClient extends Task {
setMode(JAVA_MODE);
}
- if ( !(version == BorlandDeploymentTool.BES || version == BorlandDeploymentTool.BAS)) {
- throw new BuildException("version "+version+" is not supported");
+ if (!(version == BorlandDeploymentTool.BES
+ || version == BorlandDeploymentTool.BAS)) {
+ throw new BuildException("version " + version
+ + " is not supported");
}
log("client jar file is " + clientjarfile);
@@ -200,8 +202,9 @@ public class BorlandGenerateClient extends Task {
/** launch the generate client using java api */
protected void executeJava() throws BuildException {
try {
- if ( version == BorlandDeploymentTool.BES) {
- throw new BuildException("java mode is supported only for previous version <="+BorlandDeploymentTool.BAS);
+ if (version == BorlandDeploymentTool.BES) {
+ throw new BuildException("java mode is supported only for "
+ + "previous version <=" + BorlandDeploymentTool.BAS);
}
log("mode : java");
@@ -243,10 +246,10 @@ public class BorlandGenerateClient extends Task {
/** launch the generate client using system api */
protected void executeFork() throws BuildException {
- if ( version == BorlandDeploymentTool.BAS) {
+ if (version == BorlandDeploymentTool.BAS) {
executeForkV4();
}
- if ( version == BorlandDeploymentTool.BES) {
+ if (version == BorlandDeploymentTool.BES) {
executeForkV5();
}
}
@@ -255,7 +258,7 @@ public class BorlandGenerateClient extends Task {
protected void executeForkV4() throws BuildException {
try {
- log("mode : fork "+BorlandDeploymentTool.BAS,Project.MSG_DEBUG);
+ log("mode : fork " + BorlandDeploymentTool.BAS, Project.MSG_DEBUG);
org.apache.tools.ant.taskdefs.ExecTask execTask = null;
execTask = (ExecTask) getProject().createTask("exec");
@@ -289,7 +292,7 @@ public class BorlandGenerateClient extends Task {
/** launch the generate client using system api */
protected void executeForkV5() throws BuildException {
try {
- log("mode : fork "+BorlandDeploymentTool.BES,Project.MSG_DEBUG);
+ log("mode : fork " + BorlandDeploymentTool.BES, Project.MSG_DEBUG);
org.apache.tools.ant.taskdefs.ExecTask execTask = null;
execTask = (ExecTask) getProject().createTask("exec");
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
index 38d68e28b..6d949e1ed 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/DDCreator.java
@@ -103,13 +103,13 @@ public class DDCreator extends MatchingTask {
public void execute() throws BuildException {
if (descriptorDirectory == null ||
!descriptorDirectory.isDirectory()) {
- throw new BuildException("descriptors directory " + descriptorDirectory.getPath() +
- " is not valid");
+ throw new BuildException("descriptors directory "
+ + descriptorDirectory.getPath() + " is not valid");
}
if (generatedFilesDirectory == null ||
!generatedFilesDirectory.isDirectory()) {
- throw new BuildException("dest directory " + generatedFilesDirectory.getPath() +
- " is not valid");
+ throw new BuildException("dest directory "
+ + generatedFilesDirectory.getPath() + " is not valid");
}
String args = descriptorDirectory + " " + generatedFilesDirectory;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
index c1208ff7c..9b1385113 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
@@ -442,8 +442,9 @@ public class EjbJar extends MatchingTask {
config.namingScheme = new NamingScheme();
config.namingScheme.setValue(NamingScheme.BASEJARNAME);
} else if (!config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME)) {
- throw new BuildException("The basejarname attribute is not compatible with the " +
- config.namingScheme.getValue() + " naming scheme");
+ throw new BuildException("The basejarname attribute is not "
+ + "compatible with the "
+ + config.namingScheme.getValue() + " naming scheme");
}
}
@@ -457,8 +458,9 @@ public class EjbJar extends MatchingTask {
config.namingScheme = namingScheme;
if (!config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME) &&
config.baseJarName != null) {
- throw new BuildException("The basejarname attribute is not compatible with the " +
- config.namingScheme.getValue() + " naming scheme");
+ throw new BuildException("The basejarname attribute is not "
+ + "compatible with the "
+ + config.namingScheme.getValue() + " naming scheme");
}
}
@@ -505,7 +507,7 @@ public class EjbJar extends MatchingTask {
* Initially, only the JBoss implementation does something specific for CMP 2.0.
* @since ant 1.6
*/
- public void setCmpversion( CMPVersion version) {
+ public void setCmpversion(CMPVersion version) {
this.cmpVersion = version.getValue();
}
@@ -578,8 +580,8 @@ public class EjbJar extends MatchingTask {
config.namingScheme.setValue(NamingScheme.DESCRIPTOR);
} else if (config.namingScheme.getValue().equals(NamingScheme.BASEJARNAME) &&
config.baseJarName == null) {
- throw new BuildException("The basejarname attribute must be specified " +
- "with the basejarname naming scheme");
+ throw new BuildException("The basejarname attribute must "
+ + "be specified with the basejarname naming scheme");
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
index 4bcabbf8d..3739825f4 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/Ejbc.java
@@ -114,24 +114,25 @@ public class Ejbc extends MatchingTask {
public void execute() throws BuildException {
if (descriptorDirectory == null ||
!descriptorDirectory.isDirectory()) {
- throw new BuildException("descriptors directory " + descriptorDirectory.getPath() +
- " is not valid");
+ throw new BuildException("descriptors directory "
+ + descriptorDirectory.getPath() + " is not valid");
}
if (generatedFilesDirectory == null ||
!generatedFilesDirectory.isDirectory()) {
- throw new BuildException("dest directory " + generatedFilesDirectory.getPath() +
- " is not valid");
+ throw new BuildException("dest directory "
+ + generatedFilesDirectory.getPath() + " is not valid");
}
if (sourceDirectory == null ||
!sourceDirectory.isDirectory()) {
- throw new BuildException("src directory " + sourceDirectory.getPath() +
- " is not valid");
+ throw new BuildException("src directory "
+ + sourceDirectory.getPath() + " is not valid");
}
String systemClassPath = System.getProperty("java.class.path");
- String execClassPath = getProject().translatePath(systemClassPath + ":" + classpath +
- ":" + generatedFilesDirectory);
+ String execClassPath
+ = getProject().translatePath(systemClassPath + ":" + classpath
+ + ":" + generatedFilesDirectory);
// get all the files in the descriptor directory
DirectoryScanner ds = super.getDirectoryScanner(descriptorDirectory);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
index ea5c5c674..55bf4cb00 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
@@ -375,15 +375,18 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
addedfiles.add(logicalFilename);
}
} catch (IOException ioe) {
- log("WARNING: IOException while adding entry " +
- logicalFilename + " to jarfile from " + inputFile.getPath() + " " +
- ioe.getClass().getName() + "-" + ioe.getMessage(), Project.MSG_WARN);
+ log("WARNING: IOException while adding entry "
+ + logicalFilename + " to jarfile from "
+ + inputFile.getPath() + " " + ioe.getClass().getName()
+ + "-" + ioe.getMessage(), Project.MSG_WARN);
} finally {
// Close up the file input stream for the class file
if (iStream != null) {
try {
iStream.close();
- } catch (IOException closeException) {}
+ } catch (IOException closeException) {
+ // ignore
+ }
}
}
}
@@ -555,7 +558,9 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
if (descriptorStream != null) {
try {
descriptorStream.close();
- } catch (IOException closeException) {}
+ } catch (IOException closeException) {
+ // ignore
+ }
}
}
@@ -764,7 +769,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
* ejbFiles.
*/
protected void writeJar(String baseName, File jarfile, Hashtable files,
- String publicId) throws BuildException{
+ String publicId) throws BuildException {
JarOutputStream jarStream = null;
try {
@@ -860,7 +865,9 @@ public class GenericDeploymentTool implements EJBDeploymentTool {
if (jarStream != null) {
try {
jarStream.close();
- } catch (IOException closeException) {}
+ } catch (IOException closeException) {
+ // ignore
+ }
}
}
} // end of writeJar
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
index 0197fbcf7..672b03d5b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
@@ -266,7 +266,7 @@ public class IPlanetEjbc {
EjbInfo[] ejbs = handler.getEjbs();
- for (int i = 0; i < ejbs.length ; i++) {
+ for (int i = 0; i < ejbs.length; i++) {
List descriptors = (List) ejbs[i].getCmpDescriptors();
returnList.addAll(descriptors);
}
@@ -409,7 +409,7 @@ public class IPlanetEjbc {
EjbInfo[] ejbs = getEjbs(); // Returns list of EJBs for processing
- for (int i = 0; i < ejbs.length ; i++) {
+ for (int i = 0; i < ejbs.length; i++) {
log("EJBInfo...");
log(ejbs[i].toString());
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java
index cd654d903..8b0636ffd 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/JbossDeploymentTool.java
@@ -97,15 +97,18 @@ public class JbossDeploymentTool extends GenericDeploymentTool {
return;
}
String descriptorFileName = JBOSS_CMP10D;
- if ( EjbJar.CMPVersion.CMP2_0.equals( getParent().getCmpversion() )) {
+ if (EjbJar.CMPVersion.CMP2_0.equals(getParent().getCmpversion())) {
descriptorFileName = JBOSS_CMP20D;
}
- File jbossCMPD = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName);
+ File jbossCMPD
+ = new File(getConfig().descriptorDir, ddPrefix + descriptorFileName);
if (jbossCMPD.exists()) {
ejbFiles.put(META_DIR + descriptorFileName, jbossCMPD);
} else {
- log("Unable to locate jboss cmp descriptor. It was expected to be in " + jbossCMPD.getPath(), Project.MSG_WARN);
+ log("Unable to locate jboss cmp descriptor. "
+ + "It was expected to be in "
+ + jbossCMPD.getPath(), Project.MSG_WARN);
return;
}
}
@@ -115,7 +118,7 @@ public class JbossDeploymentTool extends GenericDeploymentTool {
* of this jar will be checked against the dependent bean classes.
*/
File getVendorOutputJarFile(String baseName) {
- return new File( getParent().getDestdir(), baseName + jarSuffix);
+ return new File(getParent().getDestdir(), baseName + jarSuffix);
}
/**
@@ -129,6 +132,6 @@ public class JbossDeploymentTool extends GenericDeploymentTool {
}
private EjbJar getParent() {
- return ( EjbJar ) this.getTask();
+ return (EjbJar) this.getTask();
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
index 02fc8d57d..feea6f01c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLRun.java
@@ -178,8 +178,8 @@ public class WLRun extends Task {
throw new BuildException("weblogic home must be set");
}
if (!weblogicSystemHome.isDirectory()) {
- throw new BuildException("weblogic home directory " + weblogicSystemHome.getPath() +
- " is not valid");
+ throw new BuildException("weblogic home directory "
+ + weblogicSystemHome.getPath() + " is not valid");
}
if (beaHome != null) {
@@ -202,8 +202,8 @@ public class WLRun extends Task {
}
// If we still can't find it, complain
if (!securityPolicyFile.exists()) {
- throw new BuildException("Security policy " + securityPolicy +
- " was not found.");
+ throw new BuildException("Security policy " + securityPolicy
+ + " was not found.");
}
return securityPolicyFile;
}
@@ -212,8 +212,8 @@ public class WLRun extends Task {
File securityPolicyFile
= findSecurityPolicyFile(DEFAULT_WL60_POLICY_FILE);
if (!beaHome.isDirectory()) {
- throw new BuildException("BEA home " + beaHome.getPath() +
- " is not valid");
+ throw new BuildException("BEA home " + beaHome.getPath()
+ + " is not valid");
}
File configFile = new File(weblogicSystemHome, "config/"
@@ -224,7 +224,8 @@ public class WLRun extends Task {
}
if (managementPassword == null) {
- throw new BuildException("You must supply a management password to start the server");
+ throw new BuildException("You must supply a management password "
+ + "to start the server");
}
Java weblogicServer = (Java) getProject().createTask("java");
@@ -275,9 +276,10 @@ public class WLRun extends Task {
// OK, properties file may be absolute
propertiesFile = getProject().resolveFile(weblogicPropertiesFile);
if (!propertiesFile.exists()) {
- throw new BuildException("Properties file " + weblogicPropertiesFile +
- " not found in weblogic home " + weblogicSystemHome +
- " or as absolute file");
+ throw new BuildException("Properties file "
+ + weblogicPropertiesFile
+ + " not found in weblogic home " + weblogicSystemHome
+ + " or as absolute file");
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
index 67a7c3b05..1061f0652 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WLStop.java
@@ -124,10 +124,10 @@ public class WLStop extends Task {
if (beaHome == null) {
args = serverURL + " SHUTDOWN " + username + " " + password + " " + delay;
} else {
- args = " -url " + serverURL +
- " -username " + username +
- " -password " + password +
- " SHUTDOWN " + " " + delay;
+ args = " -url " + serverURL
+ + " -username " + username
+ + " -password " + password
+ + " SHUTDOWN " + " " + delay;
}
weblogicAdmin.createArg().setLine(args);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
index a139115c3..08c84eef1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
@@ -457,15 +457,17 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
ejbFiles.put(META_DIR + WL_DD,
weblogicDD);
} else {
- log("Unable to locate weblogic deployment descriptor. It was expected to be in " +
- weblogicDD.getPath(), Project.MSG_WARN);
+ log("Unable to locate weblogic deployment descriptor. "
+ + "It was expected to be in "
+ + weblogicDD.getPath(), Project.MSG_WARN);
return;
}
if (!newCMP) {
log("The old method for locating CMP files has been DEPRECATED.", Project.MSG_VERBOSE);
- log("Please adjust your weblogic descriptor and set newCMP=\"true\" " +
- "to use the new CMP descriptor inclusion mechanism. ", Project.MSG_VERBOSE);
+ log("Please adjust your weblogic descriptor and set "
+ + "newCMP=\"true\" to use the new CMP descriptor "
+ + "inclusion mechanism. ", Project.MSG_VERBOSE);
// The the weblogic cmp deployment descriptor
File weblogicCMPDD = new File(getConfig().descriptorDir, ddPrefix + WL_CMP_DD);
@@ -550,7 +552,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
javaTask.createJvmarg().setLine(additionalJvmArgs);
if (!(sysprops.isEmpty())) {
- for (Enumeration en = sysprops.elements() ; en.hasMoreElements();) {
+ for (Enumeration en = sysprops.elements(); en.hasMoreElements();) {
Environment.Variable entry
= (Environment.Variable) en.nextElement();
javaTask.addSysproperty(entry);
@@ -733,14 +735,15 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
for (Enumeration e = genericEntries.keys(); e.hasMoreElements();) {
String filepath = (String) e.nextElement();
- if (wlEntries.containsKey(filepath)) {// File name/path match
+ if (wlEntries.containsKey(filepath)) {
+ // File name/path match
// Check files see if same
JarEntry genericEntry = (JarEntry) genericEntries.get(filepath);
JarEntry wlEntry = (JarEntry) wlEntries.get(filepath);
- if ((genericEntry.getCrc() != wlEntry.getCrc()) || // Crc's Match
- (genericEntry.getSize() != wlEntry.getSize())) {// Size Match
+ if ((genericEntry.getCrc() != wlEntry.getCrc())
+ || (genericEntry.getSize() != wlEntry.getSize())) {
if (genericEntry.getName().endsWith(".class")) {
//File are different see if its an object or an interface
@@ -769,7 +772,8 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
}
}
- } else {// a file doesnt exist rebuild
+ } else {
+ // a file doesnt exist rebuild
log("File " + filepath + " not present in weblogic jar", Project.MSG_VERBOSE);
rebuild = true;
@@ -807,7 +811,8 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
// Use the entry from the generic jar
je = (JarEntry) replaceEntries.get(je.getName());
is = genericJar.getInputStream(je);
- } else {//use fle from original weblogic jar
+ } else {
+ //use fle from original weblogic jar
is = wlJar.getInputStream(je);
}
@@ -824,7 +829,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool {
}
if (genericLoader instanceof AntClassLoader) {
- AntClassLoader loader = (AntClassLoader)genericLoader;
+ AntClassLoader loader = (AntClassLoader) genericLoader;
loader.cleanup();
}
} else {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java
index 8a1b14b95..332df0a16 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicTOPLinkDeploymentTool.java
@@ -114,8 +114,9 @@ public class WeblogicTOPLinkDeploymentTool extends WeblogicDeploymentTool {
ejbFiles.put(META_DIR + toplinkDescriptor,
toplinkDD);
} else {
- log("Unable to locate toplink deployment descriptor. It was expected to be in " +
- toplinkDD.getPath(), Project.MSG_WARN);
+ log("Unable to locate toplink deployment descriptor. "
+ + "It was expected to be in "
+ + toplinkDD.getPath(), Project.MSG_WARN);
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
index 647c2c72c..f4f4c56d6 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
@@ -440,8 +440,9 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
ejbFiles.put(META_DIR + WAS_EXT,
websphereEXT);
} else {
- log("Unable to locate websphere extensions. It was expected to be in " +
- websphereEXT.getPath(), Project.MSG_VERBOSE);
+ log("Unable to locate websphere extensions. "
+ + "It was expected to be in "
+ + websphereEXT.getPath(), Project.MSG_VERBOSE);
}
File websphereBND = new File(getConfig().descriptorDir, ddPrefix + WAS_BND);
@@ -450,14 +451,17 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
ejbFiles.put(META_DIR + WAS_BND,
websphereBND);
} else {
- log("Unable to locate websphere bindings. It was expected to be in " +
- websphereBND.getPath(), Project.MSG_VERBOSE);
+ log("Unable to locate websphere bindings. "
+ + "It was expected to be in "
+ + websphereBND.getPath(), Project.MSG_VERBOSE);
}
if (!newCMP) {
- log("The old method for locating CMP files has been DEPRECATED.", Project.MSG_VERBOSE);
- log("Please adjust your websphere descriptor and set newCMP=\"true\" " +
- "to use the new CMP descriptor inclusion mechanism. ", Project.MSG_VERBOSE);
+ log("The old method for locating CMP files has been DEPRECATED.",
+ Project.MSG_VERBOSE);
+ log("Please adjust your websphere descriptor and set "
+ + "newCMP=\"true\" to use the new CMP descriptor "
+ + "inclusion mechanism. ", Project.MSG_VERBOSE);
} else {
// We attempt to put in the MAP and Schema files of CMP beans
try {
@@ -469,8 +473,8 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
ejbFiles.put(META_DIR + WAS_CMP_MAP,
websphereMAP);
} else {
- log("Unable to locate the websphere Map: " +
- websphereMAP.getPath(), Project.MSG_VERBOSE);
+ log("Unable to locate the websphere Map: "
+ + websphereMAP.getPath(), Project.MSG_VERBOSE);
}
File websphereSchema = new File(getConfig().descriptorDir,
@@ -480,13 +484,13 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
ejbFiles.put(META_DIR + SCHEMA_DIR + WAS_CMP_SCHEMA,
websphereSchema);
} else {
- log("Unable to locate the websphere Schema: " +
- websphereSchema.getPath(), Project.MSG_VERBOSE);
+ log("Unable to locate the websphere Schema: "
+ + websphereSchema.getPath(), Project.MSG_VERBOSE);
}
// Theres nothing else to see here...keep moving sonny
} catch (Exception e) {
- String msg = "Exception while adding Vendor specific files: " +
- e.toString();
+ String msg = "Exception while adding Vendor specific files: "
+ + e.toString();
throw new BuildException(msg, e);
}
@@ -557,7 +561,7 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
}
return options.toString();
- }// end getOptions
+ }
/**
@@ -773,7 +777,8 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
break;
}
}
- } else {// a file doesnt exist rebuild
+ } else {
+ // a file doesn't exist rebuild
log("File " + filepath + " not present in websphere jar", Project.MSG_VERBOSE);
rebuild = true;
@@ -812,7 +817,8 @@ public class WebsphereDeploymentTool extends GenericDeploymentTool {
// Use the entry from the generic jar
je = (JarEntry) replaceEntries.get(je.getName());
is = genericJar.getInputStream(je);
- } else {//use fle from original websphere jar
+ } else {
+ //use fle from original websphere jar
is = wasJar.getInputStream(je);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java
index 92dfa3261..e1e4bcdb9 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/AntResolver.java
@@ -74,38 +74,38 @@ public class AntResolver
private File m_destfile;
private String m_target;
- public void setAntfile( File antfile) {
+ public void setAntfile(File antfile) {
m_antfile = antfile;
}
- public void setDestfile( File destfile) {
+ public void setDestfile(File destfile) {
m_destfile = destfile;
}
- public void setTarget( final String target) {
+ public void setTarget(final String target) {
m_target = target;
}
- public File resolve( final Extension extension,
- final Project project )
+ public File resolve(final Extension extension,
+ final Project project)
throws BuildException {
validate();
- final Ant ant = (Ant)project.createTask( "ant" );
- ant.setInheritAll( false );
- ant.setAntfile( m_antfile.getName() );
+ final Ant ant = (Ant) project.createTask("ant");
+ ant.setInheritAll(false);
+ ant.setAntfile(m_antfile.getName());
try {
final File dir =
m_antfile.getParentFile().getCanonicalFile();
- ant.setDir( dir );
+ ant.setDir(dir);
}
- catch ( final IOException ioe) {
- throw new BuildException( ioe.getMessage(), ioe );
+ catch (final IOException ioe) {
+ throw new BuildException(ioe.getMessage(), ioe);
}
if (null != m_target) {
- ant.setTarget( m_target );
+ ant.setTarget(m_target);
}
ant.execute();
@@ -116,12 +116,12 @@ public class AntResolver
private void validate() {
if (null == m_antfile) {
final String message = "Must specify Buildfile";
- throw new BuildException( message );
+ throw new BuildException(message);
}
if (null == m_destfile) {
final String message = "Must specify destination file";
- throw new BuildException( message );
+ throw new BuildException(message);
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java
index 5f1c38758..e1bcf3027 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/LocationResolver.java
@@ -70,19 +70,19 @@ public class LocationResolver
implements ExtensionResolver {
private String m_location;
- public void setLocation( final String location) {
+ public void setLocation(final String location) {
m_location = location;
}
- public File resolve( final Extension extension,
- final Project project )
+ public File resolve(final Extension extension,
+ final Project project)
throws BuildException {
if (null == m_location) {
final String message = "No location specified for resolver";
- throw new BuildException( message );
+ throw new BuildException(message);
}
- return project.resolveFile( m_location );
+ return project.resolveFile(m_location);
}
public String toString() {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/URLResolver.java b/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/URLResolver.java
index 88a461a72..002e6322b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/URLResolver.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/extension/resolvers/URLResolver.java
@@ -74,28 +74,28 @@ public class URLResolver
private File m_destdir;
private URL m_url;
- public void setUrl( final URL url) {
+ public void setUrl(final URL url) {
m_url = url;
}
- public void setDestfile( final File destfile) {
+ public void setDestfile(final File destfile) {
m_destfile = destfile;
}
- public void setDestdir( final File destdir) {
+ public void setDestdir(final File destdir) {
m_destdir = destdir;
}
- public File resolve( final Extension extension,
- final Project project )
+ public File resolve(final Extension extension,
+ final Project project)
throws BuildException {
validate();
final File file = getDest();
- final Get get = (Get)project.createTask( "get" );
- get.setDest( file );
- get.setSrc( m_url );
+ final Get get = (Get) project.createTask("get");
+ get.setDest(file);
+ get.setSrc(m_url);
get.execute();
return file;
@@ -110,29 +110,29 @@ public class URLResolver
if (null == file || file.length() <= 1) {
filename = "default.file";
} else {
- int index = file.lastIndexOf( '/' );
+ int index = file.lastIndexOf('/');
if (-1 == index) {
index = 0;
}
- filename = file.substring( index );
+ filename = file.substring(index);
}
- return new File( m_destdir, filename );
+ return new File(m_destdir, filename);
}
}
private void validate() {
if (null == m_url) {
final String message = "Must specify URL";
- throw new BuildException( message );
+ throw new BuildException(message);
}
if (null == m_destdir && null == m_destfile) {
final String message = "Must specify destination file or directory";
- throw new BuildException( message );
+ throw new BuildException(message);
} else if (null != m_destdir && null != m_destfile) {
final String message = "Must not specify both destination file or directory";
- throw new BuildException( message );
+ throw new BuildException(message);
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java b/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
index 819dbebeb..6e57f80e1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
@@ -591,8 +591,8 @@ public class Translate extends MatchingTask {
out.close();
}
} else {
- log("Skipping " + srcFiles[j] +
- " as destination file is up to date",
+ log("Skipping " + srcFiles[j]
+ + " as destination file is up to date",
Project.MSG_VERBOSE);
}
} catch (IOException ioe) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java
index 49cccbf2b..d1d170abb 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJLocalUtil.java
@@ -206,7 +206,7 @@ abstract class VAJLocalUtil implements VAJUtil {
try {
log("Loading '" + pe.getName() + "', Version '"
+ ((pe.getVersionName() != null) ? pe.getVersionName()
- : "("+pe.getVersionStamp()+ ")")
+ : "(" + pe.getVersionStamp() + ")")
+ "' into Workspace", MSG_VERBOSE);
pe.loadIntoWorkspace();
} catch (IvjException ex) {
@@ -315,7 +315,7 @@ abstract class VAJLocalUtil implements VAJUtil {
throw new BuildException("Can't determine latest edition for project " + name);
}
log("Using version " + ((pe.getVersionName() != null) ? pe.getVersionName()
- : "("+pe.getVersionStamp()+ ")")
+ : "(" + pe.getVersionStamp() + ")")
+ " of " + pe.getName(), MSG_INFO);
return pe;
} catch (IvjException e) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java
index 118a986ab..8e05c92a4 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/AbstractHotDeploymentTool.java
@@ -146,7 +146,7 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
/**
* Sets the parent task.
* @param task a ServerDeploy object representing the parent task.
- * @ant.attribute ignore="true"
+ * @ant.attribute ignore="true"
*/
public void setTask(ServerDeploy task) {
this.task = task;
@@ -169,8 +169,8 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
}
/**
- * The classpath to be passed to the JVM running the tool;
- * optional depending upon the tool.
+ * The classpath to be passed to the JVM running the tool;
+ * optional depending upon the tool.
* The classpath may also be supplied as a nested element.
* @param classpath A Path object representing the "classpath" attribute.
*/
@@ -203,7 +203,7 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool {
}
/**
- * The password of the user; optional.
+ * The password of the user; optional.
* @param password A String representing the "password" attribute.
*/
public void setPassword(String password) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java
index 66457b205..bdf9821e8 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/GenericHotDeploymentTool.java
@@ -77,7 +77,7 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool {
private String className;
/** List of valid actions **/
- private static final String[] VALID_ACTIONS = { ACTION_DEPLOY };
+ private static final String[] VALID_ACTIONS = {ACTION_DEPLOY};
/**
* Add a nested argument element to hand to the deployment tool; optional.
@@ -150,7 +150,7 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool {
/**
* The name of the class to execute to perfom
- * deployment; required.
+ * deployment; required.
* Example: "com.foobar.tools.deploy.DeployTool"
* @param className The fully qualified class name of the class
* to perform deployment.
@@ -158,14 +158,14 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool {
public void setClassName(String className) {
this.className = className;
}
-
+
/**
*
*/
public Java getJava() {
return java;
}
-
+
public String getClassName() {
return className;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java
index d4c4669ea..632338fca 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/ServerDeploy.java
@@ -138,7 +138,7 @@ public class ServerDeploy extends Task {
* a failure occurs in the deployment process.
*/
public void execute() throws BuildException {
- for (Enumeration enum = vendorTools.elements();
+ for (Enumeration enum = vendorTools.elements();
enum.hasMoreElements();) {
HotDeploymentTool tool = (HotDeploymentTool) enum.nextElement();
tool.validateAttributes();
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
index 2be14946a..e8d863fb8 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
@@ -242,7 +242,7 @@ public class JJTree extends Task {
}
cmdl.createArgument().setValue(target.getAbsolutePath());
- cmdl.setClassname(JavaCC.getMainClass(javaccHome,
+ cmdl.setClassname(JavaCC.getMainClass(javaccHome,
JavaCC.TASKDEF_TYPE_JJTREE));
final Path classpath = cmdl.createClasspath(getProject());
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/ClassNameReader.java b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/ClassNameReader.java
index 1cb21c0d3..b605735ff 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/ClassNameReader.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/ClassNameReader.java
@@ -67,7 +67,7 @@ import java.io.InputStream;
*/
class ConstantPool {
- static final
+ static final
byte UTF8 = 1, UNUSED = 2, INTEGER = 3, FLOAT = 4, LONG = 5, DOUBLE = 6,
CLASS = 7, STRING = 8, FIELDREF = 9, METHODREF = 10,
INTERFACEMETHODREF = 11, NAMEANDTYPE = 12;
@@ -90,33 +90,33 @@ class ConstantPool {
case UTF8 :
values[i] = data.readUTF();
break;
-
+
case UNUSED :
break;
-
+
case INTEGER :
values[i] = new Integer(data.readInt());
break;
-
+
case FLOAT :
values[i] = new Float(data.readFloat());
break;
-
+
case LONG :
values[i] = new Long(data.readLong());
++i;
break;
-
+
case DOUBLE :
values[i] = new Double(data.readDouble());
++i;
break;
-
+
case CLASS :
case STRING :
values[i] = new Integer(data.readUnsignedShort());
break;
-
+
case FIELDREF :
case METHODREF :
case INTERFACEMETHODREF :
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
index bcd9cde69..e72479eab 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
@@ -249,7 +249,7 @@ public class JspC extends MatchingTask {
* @param uribase The new Uribase value
*/
public void setUribase(File uribase) {
- log( "Uribase is currently an unused parameter", Project.MSG_WARN);
+ log("Uribase is currently an unused parameter", Project.MSG_WARN);
}
public File getUribase() {
@@ -407,10 +407,8 @@ public class JspC extends MatchingTask {
}
if (!destDir.isDirectory()) {
- throw new
- BuildException("destination directory \"" + destDir +
- "\" does not exist or is not a directory",
- getLocation());
+ throw new BuildException("destination directory \"" + destDir
+ + "\" does not exist or is not a directory", getLocation());
}
File dest = getActualDestDir();
@@ -421,7 +419,7 @@ public class JspC extends MatchingTask {
getProject().createClassLoader(compilerClasspath));
//if we are a webapp, hand off to the compiler, which had better handle it
- if (webApp!=null) {
+ if (webApp != null) {
doCompilation(compiler);
return;
}
@@ -454,8 +452,8 @@ public class JspC extends MatchingTask {
for (int i = 0; i < list.length; i++) {
File srcDir = getProject().resolveFile(list[i]);
if (!srcDir.exists()) {
- throw new BuildException("srcdir \"" + srcDir.getPath() +
- "\" does not exist!", getLocation());
+ throw new BuildException("srcdir \"" + srcDir.getPath()
+ + "\" does not exist!", getLocation());
}
DirectoryScanner ds = this.getDirectoryScanner(srcDir);
String[] files = ds.getIncludedFiles();
@@ -469,8 +467,7 @@ public class JspC extends MatchingTask {
if (compileList.size() > 0) {
- log("Compiling " + compileList.size() +
- " source file"
+ log("Compiling " + compileList.size() + " source file"
+ (compileList.size() == 1 ? "" : "s")
+ dest);
doCompilation(compiler);
@@ -493,8 +490,8 @@ public class JspC extends MatchingTask {
if (packageName == null) {
dest = destDir;
} else {
- String path = destDir.getPath() + File.separatorChar +
- packageName.replace('.', File.separatorChar);
+ String path = destDir.getPath() + File.separatorChar
+ + packageName.replace('.', File.separatorChar);
dest = new File(path);
}
return dest;
@@ -537,7 +534,7 @@ public class JspC extends MatchingTask {
String filename = files[i];
File srcFile = new File(srcDir, filename);
File javaFile = mapToJavaFile(mangler, srcFile, srcDir, dest);
- if (javaFile==null) {
+ if (javaFile == null) {
continue;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
index 0cd5c3301..10581be8c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
@@ -319,8 +319,8 @@ public class WLJspc extends MatchingTask {
File classFile = new File(this.destinationDirectory, filePath);
if (srcFile.lastModified() > now) {
- log("Warning: file modified in the future: " +
- files[i], Project.MSG_WARN);
+ log("Warning: file modified in the future: "
+ + files[i], Project.MSG_WARN);
}
if (srcFile.lastModified() > classFile.lastModified()) {
filesToDo.addElement(files[i]);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java
index cb030878d..231318e81 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java
@@ -74,7 +74,7 @@ public abstract class DefaultJspCompilerAdapter
private static String lSep = System.getProperty("line.separator");
/**
- * Logs the compilation parameters, adds the files to compile and logs the
+ * Logs the compilation parameters, adds the files to compile and logs the
* "niceSourceList"
*/
protected void logAndAddFilesToCompile(JspC jspc,
@@ -120,7 +120,7 @@ public abstract class DefaultJspCompilerAdapter
return owner;
}
-
+
/**
* add an argument oneple to the argument list, if the value aint null
*
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
index 8951b99f4..04f0b69f5 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
@@ -97,14 +97,15 @@ public class JasperC extends DefaultJspCompilerAdapter {
// the project log
Java java = (Java) (getProject().createTask("java"));
if (getJspc().getClasspath() != null) {
- getProject().log("using user supplied classpath: "+getJspc().getClasspath(),
- Project.MSG_DEBUG);
+ getProject().log("using user supplied classpath: "
+ + getJspc().getClasspath(), Project.MSG_DEBUG);
java.setClasspath(getJspc().getClasspath()
.concatSystemClasspath("ignore"));
} else {
- Path classpath=new Path(getProject());
- classpath=classpath.concatSystemClasspath("only");
- getProject().log("using system classpath: "+classpath, Project.MSG_DEBUG);
+ Path classpath = new Path(getProject());
+ classpath = classpath.concatSystemClasspath("only");
+ getProject().log("using system classpath: " + classpath,
+ Project.MSG_DEBUG);
java.setClasspath(classpath);
}
java.setDir(getProject().getBaseDir());
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JspCompilerAdapter.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JspCompilerAdapter.java
index 9f020db86..120c90a25 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JspCompilerAdapter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JspCompilerAdapter.java
@@ -58,7 +58,7 @@ import org.apache.tools.ant.taskdefs.optional.jsp.JspC;
import org.apache.tools.ant.taskdefs.optional.jsp.JspMangler;
/**
- * The interface that all jsp compiler adapters must adher to.
+ * The interface that all jsp compiler adapters must adher to.
*
* A compiler adapter is an adapter that interprets the jspc's
* parameters in preperation to be passed off to the compier this
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java
index 4514b84aa..8469a09d2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java
@@ -57,7 +57,6 @@ package org.apache.tools.ant.taskdefs.optional.junit;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
-import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.types.EnumeratedAttribute;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitResultFormatter.java
index ea82fa5be..db0247dbf 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitResultFormatter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitResultFormatter.java
@@ -61,7 +61,7 @@ import org.apache.tools.ant.BuildException;
/**
* This Interface describes classes that format the results of a JUnit
* testrun.
- *
+ *
* @author Stefan Bodewig
*/
public interface JUnitResultFormatter extends TestListener {
@@ -69,7 +69,7 @@ public interface JUnitResultFormatter extends TestListener {
* The whole testsuite started.
*/
void startTestSuite(JUnitTest suite) throws BuildException;
-
+
/**
* The whole testsuite ended.
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
index fa8d6734a..e13831b7b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
@@ -894,7 +894,7 @@ public class JUnitTask extends Task {
runner.run();
return runner.getRetCode();
- } finally{
+ } finally {
if (sysProperties != null) {
sysProperties.restoreSystem();
}
@@ -947,7 +947,7 @@ public class JUnitTask extends Task {
* @since Ant 1.3
*/
protected Enumeration allTests() {
- Enumeration[] enums = { tests.elements(), batchTests.elements() };
+ Enumeration[] enums = {tests.elements(), batchTests.elements()};
return Enumerations.fromCompound(enums);
}
@@ -1032,7 +1032,7 @@ public class JUnitTask extends Task {
OutputStream out = new FileOutputStream(outFile);
formatter.setOutput(out);
formatter.startTestSuite(test);
- test.setCounts(0,0,1);
+ test.setCounts(0, 0, 1);
Test t = new Test() {
public int countTestCases() { return 0; }
public void run(TestResult r) {
@@ -1045,7 +1045,9 @@ public class JUnitTask extends Task {
new AssertionFailedError("Timeout occurred"));
formatter.endTestSuite(test);
- } catch (IOException e) {}
+ } catch (IOException e) {
+ // ignore
+ }
}
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
index f6ed995f3..7aa93062c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
@@ -73,7 +73,6 @@ import junit.framework.Test;
import junit.framework.TestListener;
import junit.framework.TestResult;
import junit.framework.TestSuite;
-import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.util.StringUtils;
@@ -358,14 +357,16 @@ public class JUnitTestRunner implements TestListener {
*
*
A new Test is started.
*/
- public void startTest(Test t) {}
+ public void startTest(Test t) {
+ }
/**
* Interface TestListener.
*
*
A Test is finished.
*/
- public void endTest(Test test) {}
+ public void endTest(Test test) {
+ }
/**
* Interface TestListener for JUnit <= 3.4.
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java
index 7f5760657..e4a454b84 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java
@@ -75,7 +75,9 @@ public class JUnitVersionHelper {
// pre JUnit 3.7
try {
testCaseName = TestCase.class.getMethod("name", new Class[0]);
- } catch (NoSuchMethodException e2) {}
+ } catch (NoSuchMethodException e2) {
+ // ignore
+ }
}
}
@@ -93,22 +95,26 @@ public class JUnitVersionHelper {
if (t instanceof TestCase && testCaseName != null) {
try {
return (String) testCaseName.invoke(t, new Object[0]);
- } catch (Throwable e) {}
+ } catch (Throwable e) {
+ // ignore
+ }
} else {
try {
Method getNameMethod = null;
try {
- getNameMethod =
+ getNameMethod =
t.getClass().getMethod("getName", new Class [0]);
} catch (NoSuchMethodException e) {
- getNameMethod = t.getClass().getMethod("name",
+ getNameMethod = t.getClass().getMethod("name",
new Class [0]);
}
if (getNameMethod != null &&
getNameMethod.getReturnType() == String.class) {
return (String) getNameMethod.invoke(t, new Object[0]);
}
- } catch (Throwable e) {}
+ } catch (Throwable e) {
+ // ignore
+ }
}
return "unknown";
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
index d54bb2878..fb7c0adff 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
@@ -142,7 +142,7 @@ public class PlainJUnitResultFormatter implements JUnitResultFormatter {
sb.append(nf.format(suite.getRunTime() / 1000.0));
sb.append(" sec");
sb.append(newLine);
-
+
// append the err and output streams to the log
if (systemOutput != null && systemOutput.length() > 0) {
sb.append("------------- Standard Output ---------------")
@@ -151,7 +151,7 @@ public class PlainJUnitResultFormatter implements JUnitResultFormatter {
.append("------------- ---------------- ---------------")
.append(newLine);
}
-
+
if (systemError != null && systemError.length() > 0) {
sb.append("------------- Standard Error -----------------")
.append(newLine)
@@ -174,7 +174,9 @@ public class PlainJUnitResultFormatter implements JUnitResultFormatter {
if (out != System.out && out != System.err) {
try {
out.close();
- } catch (IOException e) {}
+ } catch (IOException e) {
+ // ignore
+ }
}
}
}
@@ -197,7 +199,7 @@ public class PlainJUnitResultFormatter implements JUnitResultFormatter {
*/
public void endTest(Test test) {
synchronized (wri) {
- wri.print("Testcase: "
+ wri.print("Testcase: "
+ JUnitVersionHelper.getTestCaseName(test));
if (Boolean.TRUE.equals(failed.get(test))) {
return;
@@ -206,10 +208,10 @@ public class PlainJUnitResultFormatter implements JUnitResultFormatter {
double seconds = 0;
// can be null if an error occured in setUp
if (l != null) {
- seconds =
+ seconds =
(System.currentTimeMillis() - l.longValue()) / 1000.0;
}
-
+
wri.println(" took " + nf.format(seconds) + " sec");
}
}
@@ -255,5 +257,5 @@ public class PlainJUnitResultFormatter implements JUnitResultFormatter {
wri.println("");
}
}
-
+
} // PlainJUnitResultFormatter
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java
index d3a354e73..eee61cce1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java
@@ -66,7 +66,7 @@ import org.apache.tools.ant.BuildException;
*
* @author Stefan Bodewig
*/
-
+
public class SummaryJUnitResultFormatter implements JUnitResultFormatter {
/**
@@ -85,23 +85,28 @@ public class SummaryJUnitResultFormatter implements JUnitResultFormatter {
/**
* Empty
*/
- public SummaryJUnitResultFormatter() {}
+ public SummaryJUnitResultFormatter() {
+ }
/**
* Empty
*/
- public void startTestSuite(JUnitTest suite) {}
+ public void startTestSuite(JUnitTest suite) {
+ }
/**
* Empty
*/
- public void startTest(Test t) {}
+ public void startTest(Test t) {
+ }
/**
* Empty
*/
- public void endTest(Test test) {}
+ public void endTest(Test test) {
+ }
/**
* Empty
*/
- public void addFailure(Test test, Throwable t) {}
+ public void addFailure(Test test, Throwable t) {
+ }
/**
* Interface TestListener for JUnit > 3.4.
*
@@ -113,8 +118,9 @@ public class SummaryJUnitResultFormatter implements JUnitResultFormatter {
/**
* Empty
*/
- public void addError(Test test, Throwable t) {}
-
+ public void addError(Test test, Throwable t) {
+ }
+
public void setOutput(OutputStream out) {
this.out = out;
}
@@ -156,7 +162,7 @@ public class SummaryJUnitResultFormatter implements JUnitResultFormatter {
sb.append("Output:").append(newLine).append(systemOutput)
.append(newLine);
}
-
+
if (systemError != null && systemError.length() > 0) {
sb.append("Error: ").append(newLine).append(systemError)
.append(newLine);
@@ -172,7 +178,9 @@ public class SummaryJUnitResultFormatter implements JUnitResultFormatter {
if (out != System.out && out != System.err) {
try {
out.close();
- } catch (IOException e) {}
+ } catch (IOException e) {
+ // ignore
+ }
}
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
index f79e714a6..865f493a6 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
@@ -79,7 +79,7 @@ import org.w3c.dom.Text;
* @author Stefan Bodewig
* @author Erik Hatcher
*
- * @see FormatterElement
+ * @see FormatterElement
*/
public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstants {
@@ -117,7 +117,8 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
*/
private OutputStream out;
- public XMLJUnitResultFormatter() {}
+ public XMLJUnitResultFormatter() {
+ }
public void setOutput(OutputStream out) {
this.out = out;
@@ -177,7 +178,9 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
if (wri != null) {
try {
wri.close();
- } catch (IOException e) {}
+ } catch (IOException e) {
+ // ignore
+ }
}
}
}
@@ -209,7 +212,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
Element currentTest = null;
if (!failedTests.containsKey(test)) {
currentTest = doc.createElement(TESTCASE);
- currentTest.setAttribute(ATTR_NAME,
+ currentTest.setAttribute(ATTR_NAME,
JUnitVersionHelper.getTestCaseName(test));
rootElement.appendChild(currentTest);
testElements.put(test, currentTest);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
index 444afe25e..520905d1a 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
@@ -150,8 +150,8 @@ public abstract class AbstractMetamataTask extends Task {
}
/**
- * Sets the source path.
- * Overrides the SOURCEPATH environment variable.
+ * Sets the source path.
+ * Overrides the SOURCEPATH environment variable.
*/
public Path createSourcepath() {
if (sourcePath == null) {
@@ -161,8 +161,8 @@ public abstract class AbstractMetamataTask extends Task {
}
/**
- * Additional optional parameters to pass to the JVM.
- * You can avoid using the <jvmarg>
by adding these empty
+ * Additional optional parameters to pass to the JVM.
+ * You can avoid using the <jvmarg>
by adding these empty
* entries to metamata.properties
located at ${metamata.home}/bin
*
*
metamata.classpath=
@@ -176,20 +176,20 @@ public abstract class AbstractMetamataTask extends Task {
/**
* Set the maximum memory for the JVM; optional.
- * -mx or -Xmx depending on VM version
+ * -mx or -Xmx depending on VM version
*/
public void setMaxmemory(String max) {
cmdl.setMaxmemory(max);
}
- /**
+ /**
* The java files or directory to audit.
- * Whatever the filter is, only the files that end
- * with .java will be included for processing.
- * Note that the base directory used for the fileset
+ * Whatever the filter is, only the files that end
+ * with .java will be included for processing.
+ * Note that the base directory used for the fileset
* MUST be the root of the source files otherwise package names
- * deduced from the file path will be incorrect.
+ * deduced from the file path will be incorrect.
*/
public void addFileSet(FileSet fs) {
fileSets.addElement(fs);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
index 8731cbe2d..e3027d6e8 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
@@ -304,7 +304,9 @@ public class MParse extends AbstractMetamataTask {
if (fw != null) {
try {
fw.close();
- } catch (IOException ignored) {}
+ } catch (IOException ignored) {
+ // ignore
+ }
}
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
index 3b9eb2ca3..5d921a4f2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
@@ -57,7 +57,7 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.email.EmailTask;
/**
- * A task to send SMTP email; Use mail instead
+ * A task to send SMTP email; Use mail instead
*
* @deprecated Use {@link EmailTask} instead.
*
@@ -75,7 +75,7 @@ public class MimeMail extends EmailTask {
*/
public void execute()
throws BuildException {
- log("DEPRECATED - The " + getTaskName() + " task is deprecated. "
+ log("DEPRECATED - The " + getTaskName() + " task is deprecated. "
+ "Use the mail task instead.");
super.execute();
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java
index cf60f1c44..8650b9a3e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/RExecTask.java
@@ -89,12 +89,12 @@ public class RExecTask extends Task {
private String command = null;
/**
- * The server to connect to.
+ * The server to connect to.
*/
private String server = null;
/**
- * The tcp port to connect to.
+ * The tcp port to connect to.
*/
private int port = RExecClient.DEFAULT_PORT;
@@ -119,13 +119,13 @@ public class RExecTask extends Task {
*/
private Integer defaultTimeout = null;
- /**
+ /**
* This class is the parent of the Read and Write tasks.
* It handles the common attributes for both.
*/
public class RExecSubTask {
protected String taskString = "";
- public void execute(AntRExecClient rexec)
+ public void execute(AntRExecClient rexec)
throws BuildException {
throw new BuildException("Shouldn't be able instantiate a SubTask directly");
}
@@ -150,7 +150,7 @@ public class RExecTask extends Task {
*/
public class RExecWrite extends RExecSubTask {
private boolean echoString = true;
- public void execute(AntRExecClient rexec)
+ public void execute(AntRExecClient rexec)
throws BuildException {
rexec.sendString(taskString, echoString);
}
@@ -170,7 +170,7 @@ public class RExecTask extends Task {
*/
public class RExecRead extends RExecSubTask {
private Integer timeout = null;
- public void execute(AntRExecClient rexec)
+ public void execute(AntRExecClient rexec)
throws BuildException {
rexec.waitForString(taskString, timeout);
}
@@ -200,16 +200,16 @@ public class RExecTask extends Task {
*/
public class AntRExecClient extends RExecClient {
/**
- * Read from the rexec session until the string we are
- * waiting for is found
- * @param s The string to wait on
+ * Read from the rexec session until the string we are
+ * waiting for is found
+ * @param s The string to wait on
*/
public void waitForString(String s) {
waitForString(s, null);
}
/**
- * Read from the rexec session until the string we are
+ * Read from the rexec session until the string we are
* waiting for is found or the timeout has been reached
* @param s The string to wait on
* @param timeout The maximum number of seconds to wait
@@ -272,42 +272,42 @@ public class RExecTask extends Task {
try {
StringBuffer sb = new StringBuffer();
if (timeout == null || timeout.intValue() == 0) {
- int read;
+ int read;
while ((read = is.read()) != -1) {
char c = (char) read;
sb.append(c);
if (c == '\n') {
- log(sb.toString(), Project.MSG_INFO);
- sb.delete(0, sb.length());
+ log(sb.toString(), Project.MSG_INFO);
+ sb.delete(0, sb.length());
}
}
} else {
Calendar endTime = Calendar.getInstance();
endTime.add(Calendar.SECOND, timeout.intValue());
- int read = 0;
+ int read = 0;
while (read != -1) {
while (Calendar.getInstance().before(endTime) && is.available() == 0) {
Thread.sleep(250);
}
if (is.available() == 0) {
- log(sb.toString(), Project.MSG_INFO);
+ log(sb.toString(), Project.MSG_INFO);
throw new BuildException(
"Response timed-out waiting for EOF",
getLocation());
}
read = is.read();
if (read != -1) {
- char c = (char) read;
- sb.append(c);
- if (c == '\n') {
+ char c = (char) read;
+ sb.append(c);
+ if (c == '\n') {
log(sb.toString(), Project.MSG_INFO);
sb.delete(0, sb.length());
- }
+ }
}
}
}
if (sb.length() > 0) {
- log(sb.toString(), Project.MSG_INFO);
+ log(sb.toString(), Project.MSG_INFO);
}
} catch (BuildException be) {
throw be;
@@ -318,11 +318,11 @@ public class RExecTask extends Task {
}
/**
- * A string to wait for from the server.
- * A subTask <read> tag was found. Create the object,
+ * A string to wait for from the server.
+ * A subTask <read> tag was found. Create the object,
* Save it in our list, and return it.
*/
-
+
public RExecSubTask createRead() {
RExecSubTask task = (RExecSubTask) new RExecRead();
rexecTasks.addElement(task);
@@ -330,7 +330,7 @@ public class RExecTask extends Task {
}
/**
* Add text to send to the server
- * A subTask <write> tag was found. Create the object,
+ * A subTask <write> tag was found. Create the object,
* Save it in our list, and return it.
*/
public RExecSubTask createWrite() {
@@ -338,17 +338,17 @@ public class RExecTask extends Task {
rexecTasks.addElement(task);
return task;
}
- /**
- * Verify that all parameters are included.
+ /**
+ * Verify that all parameters are included.
* Connect and possibly login
- * Iterate through the list of Reads and writes
+ * Iterate through the list of Reads and writes
*/
public void execute() throws BuildException {
/** A server name is required to continue */
if (server == null) {
throw new BuildException("No Server Specified");
}
- /** A userid and password must appear together
+ /** A userid and password must appear together
* if they appear. They are not required.
*/
if (userid == null && password != null) {
@@ -382,8 +382,8 @@ public class RExecTask extends Task {
/** Keep reading input stream until end of it or time-out */
rexec.waitForEOF(defaultTimeout);
}
- /**
- * Process a 'typical' login. If it differs, use the read
+ /**
+ * Process a 'typical' login. If it differs, use the read
* and write tasks explicitely
*/
private void login() {
@@ -396,7 +396,7 @@ public class RExecTask extends Task {
rexec.sendString(password, false);
}
/**
- * Set the the comand to execute on the server;
+ * Set the the comand to execute on the server;
*/
public void setCommand(String c) { this.command = c; }
/**
@@ -407,7 +407,7 @@ public class RExecTask extends Task {
}
/**
* Set the the login password to use
- * required if userid is set.
+ * required if userid is set.
*/
public void setPassword(String p) { this.password = p; }
/**
@@ -419,15 +419,15 @@ public class RExecTask extends Task {
*/
public void setServer(String m) { this.server = m; }
/**
- * set a default timeout in seconds to wait for a response,
- * zero means forever (the default)
+ * set a default timeout in seconds to wait for a response,
+ * zero means forever (the default)
*/
public void setTimeout(Integer i) {
this.defaultTimeout = i;
}
/**
- * Set the the login id to use on the server;
- * required if password is set.
+ * Set the the login id to use on the server;
+ * required if password is set.
*/
public void setUserid(String u) { this.userid = u; }
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java
index d26808aba..f3736cfbb 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/SetProxy.java
@@ -123,12 +123,12 @@ public class SetProxy extends Task {
/**
* user for http only
*/
- private String proxyUser=null;
+ private String proxyUser = null;
/**
* password for http only
*/
- private String proxyPassword=null;
+ private String proxyPassword = null;
/**
* the HTTP/ftp proxy host. Set this to "" for the http proxy
@@ -229,7 +229,7 @@ public class SetProxy extends Task {
sysprops.put("https.nonProxyHosts", nonProxyHosts);
sysprops.put("ftp.nonProxyHosts", nonProxyHosts);
}
- if (proxyUser!=null) {
+ if (proxyUser != null) {
sysprops.put("http.proxyUser", proxyUser);
sysprops.put("http.proxyPassword", proxyPassword);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
index 0bda5365a..74dcca793 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
@@ -258,7 +258,7 @@ public class Pvcs extends org.apache.tools.ant.Task {
commandLine.clearArgs();
commandLine.setExecutable(getExecutable(GET_EXE));
- if (getConfig() != null && getConfig().length()>0) {
+ if (getConfig() != null && getConfig().length() > 0) {
commandLine.createArgument().setValue("-c" + getConfig());
}
@@ -330,13 +330,12 @@ public class Pvcs extends org.apache.tools.ant.Task {
String line = in.readLine();
while (line != null) {
log("Considering \"" + line + "\"", Project.MSG_VERBOSE);
- if (line.startsWith("\"\\") ||
- line.startsWith("\"/") ||
- (line.length() >3 &&
- line.startsWith("\"") &&
- Character.isLetter(line.charAt(1)) &&
- String.valueOf(line.charAt(2)).equals(":") &&
- String.valueOf(line.charAt(3)).equals("\\"))) {
+ if (line.startsWith("\"\\")
+ || line.startsWith("\"/")
+ || (line.length() > 3 && line.startsWith("\"")
+ && Character.isLetter(line.charAt(1))
+ && String.valueOf(line.charAt(2)).equals(":")
+ && String.valueOf(line.charAt(3)).equals("\\"))) {
Object[] objs = mf.parse(line);
String f = (String) objs[1];
// Extract the name of the directory from the filename
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java
index 187d6b3bf..f09a3ece8 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/PvcsProject.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -61,18 +61,18 @@ package org.apache.tools.ant.taskdefs.optional.pvcs;
*/
public class PvcsProject {
private String name;
-
+
public PvcsProject() {
super();
}
-
+
/**
* Set the name of the project
*/
public void setName(String name) {
PvcsProject.this.name = name;
}
-
+
/**
* Get the name of the project
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java b/src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java
index af806882a..8734ee536 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java
@@ -366,15 +366,16 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task {
setFolderName(null);
} else {
f = StarTeamFinder.findFolder(v.getRootFolder(), getFolderName());
- assertTrue(null != f, "ERROR: " + getProjectName() + delim + getViewName() + delim +
- v.getRootFolder() + delim + getFolderName() + delim +
- " does not exist.");
+ assertTrue(null != f, "ERROR: " + getProjectName() + delim
+ + getViewName() + delim + v.getRootFolder() + delim
+ + getFolderName() + delim
+ + " does not exist.");
}
}
if (getVerbose() && getFolderName() != null) {
- log("Found " + getProjectName() + delim + getViewName() +
- delim + getFolderName() + delim + "\n");
+ log("Found " + getProjectName() + delim + getViewName()
+ + delim + getFolderName() + delim + "\n");
}
// For performance reasons, it is important to pre-fetch all the
@@ -460,7 +461,7 @@ public class AntStarTeamCheckOut extends org.apache.tools.ant.Task {
currentToken = pathTokenizer.nextToken();
if (currentToken.equals(getProjectName()) && !foundRoot) {
currentToken = dirName;
- foundRoot = true;// only want to do this the first time
+ foundRoot = true; // only want to do this the first time
}
root = new java.io.File(root, currentToken);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovBase.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovBase.java
index b93e56a26..8b7385f08 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovBase.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovBase.java
@@ -97,7 +97,7 @@ public abstract class CovBase extends Task {
}
}
}
-
+
return loc;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
index 1397f1fba..128b28b24 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/CovMerge.java
@@ -121,13 +121,13 @@ public class CovMerge extends CovBase {
if (verbose) {
cmdl.createArgument().setValue("-v");
}
- cmdl.createArgument().setValue(getParamFileArgument()
+ cmdl.createArgument().setValue(getParamFileArgument()
+ paramfile.getAbsolutePath());
if (isJProbe4Plus()) {
// last argument is the output snapshot - JProbe 4.x
// doesn't like it in the parameter file.
- cmdl.createArgument().setValue(tofile.getPath());
+ cmdl.createArgument().setValue(tofile.getPath());
}
LogStreamHandler handler = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java
index b68af0f4a..b87e40d25 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Filters.java
@@ -77,7 +77,7 @@ public class Filters {
/**
* Automatically exclude all classes and methods
- * unless included in nested elements; optional, default true.
+ * unless included in nested elements; optional, default true.
*/
public void setDefaultExclude(boolean value) {
defaultExclude = value;
@@ -123,12 +123,12 @@ public class Filters {
protected String method = "*"; // default is all methods
protected boolean enabled = true; // default is enable
- /**
+ /**
* this one is deprecated.
* @ant.task ignore="true"
*/
-
- public void setName(String value) {
+
+ public void setName(String value) {
clazz = value;
}
@@ -148,10 +148,10 @@ public class Filters {
method = value;
}
- /**
+ /**
* enable or disable the filter; optional, default true
*/
-
+
public void setEnabled(boolean value) {
enabled = value;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java
index 699438482..bad1a83b5 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sitraka/Triggers.java
@@ -106,7 +106,7 @@ public class Triggers {
* The name of the method(s) as a regular expression. The name
* is the fully qualified name on the form package.classname.method
* required.
- */
+ */
public void setName(String value) {
name = value;
}
@@ -126,7 +126,7 @@ public class Triggers {
/**
* The action to execute; required. Must be one of "clear",
* "pause", "resume", "snapshot", "suspend",
- * or "exit". They respectively clear recording, pause recording,
+ * or "exit". They respectively clear recording, pause recording,
* resume recording, take a snapshot, suspend the recording and exit the program.
*/
public void setAction(String value) throws BuildException {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java
index 7bdddb200..df2c5504b 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java
@@ -375,8 +375,8 @@ public abstract class SOS extends Task implements SOSCmd {
if (!dir.exists()) {
boolean done = dir.mkdirs();
if (!done) {
- String msg = "Directory " + localPath + " creation was not " +
- "successful for an unknown reason";
+ String msg = "Directory " + localPath + " creation was not "
+ + "successful for an unknown reason";
throw new BuildException(msg, getLocation());
}
getProject().log("Created dir: " + dir.getAbsolutePath());
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java
index ed752fde3..652f6f8cc 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/sound/SoundTask.java
@@ -168,34 +168,34 @@ public class SoundTask extends Task {
* Gets the location of the file to get the audio.
*/
public File getSource() {
- File nofile = null ;
+ File nofile = null;
// Check if source is a directory
if (source.exists()) {
if (source.isDirectory()) {
// get the list of files in the dir
- String[] entries = source.list() ;
- Vector files = new Vector() ;
- for (int i = 0 ; i < entries.length ; i++) {
- File f = new File(source, entries[i]) ;
+ String[] entries = source.list();
+ Vector files = new Vector();
+ for (int i = 0; i < entries.length; i++) {
+ File f = new File(source, entries[i]);
if (f.isFile()) {
- files.addElement(f) ;
+ files.addElement(f);
}
}
if (files.size() < 1) {
throw new BuildException("No files found in directory " + source);
}
- int numfiles = files.size() ;
+ int numfiles = files.size();
// get a random number between 0 and the number of files
- Random rn = new Random() ;
- int x = rn.nextInt(numfiles) ;
+ Random rn = new Random();
+ int x = rn.nextInt(numfiles);
// set the source to the file at that location
this.source = (File) files.elementAt(x);
}
} else {
- log(source + ": invalid path.", Project.MSG_WARN) ;
- this.source = nofile ;
+ log(source + ": invalid path.", Project.MSG_WARN);
+ this.source = nofile;
}
- return this.source ;
+ return this.source;
}
/**
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashScreen.java b/src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashScreen.java
index 2166e63cd..8a685fc0c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashScreen.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashScreen.java
@@ -138,16 +138,33 @@ class SplashScreen extends JWindow implements ActionListener, BuildListener {
pb.setValue(total);
}
- public void buildStarted(BuildEvent event) { actionPerformed(null);}
+ public void buildStarted(BuildEvent event) {
+ actionPerformed(null);
+ }
+
public void buildFinished(BuildEvent event) {
pb.setValue(max);
setVisible(false);
dispose();
}
- public void targetStarted(BuildEvent event) {actionPerformed(null);}
- public void targetFinished(BuildEvent event) {actionPerformed(null);}
- public void taskStarted(BuildEvent event) {actionPerformed(null);}
- public void taskFinished(BuildEvent event) {actionPerformed(null);}
- public void messageLogged(BuildEvent event) {actionPerformed(null);}
+ public void targetStarted(BuildEvent event) {
+ actionPerformed(null);
+ }
+
+ public void targetFinished(BuildEvent event) {
+ actionPerformed(null);
+ }
+
+ public void taskStarted(BuildEvent event) {
+ actionPerformed(null);
+ }
+
+ public void taskFinished(BuildEvent event) {
+ actionPerformed(null);
+ }
+
+ public void messageLogged(BuildEvent event) {
+ actionPerformed(null);
+ }
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
index 35f193f36..e07f29a15 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java
@@ -300,8 +300,8 @@ public class StarTeamCheckout extends TreeBasedTask {
+ (this.useRepositoryTimeStamp ? "repository timestamps."
: "the current timestamp."));
log(" Items will be checked out "
- + (this.isForced() ? "regardless of" : "in accordance with") +
- " repository status.");
+ + (this.isForced() ? "regardless of" : "in accordance with")
+ + " repository status.");
if (this.deleteUncontrolled) {
log(" Local items not found in the repository will be deleted.");
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java
index 1b8b73ccd..48465f527 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java
@@ -73,7 +73,7 @@ import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.FileSet;
/**
- * @author Patrick G. Heck
+ * @author Patrick G. Heck
* gus.heck@olin.edu
* @since Ant 1.6
*
@@ -107,7 +107,7 @@ public abstract class AbstractAccessTask
* @param cmdl A user supplied command line that we won't accept.
*/
public void setCommand(Commandline cmdl) {
- throw new BuildException(taskType
+ throw new BuildException(taskType
+ " doesn\'t support the command attribute",
getLocation());
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java
index cc951f98f..075dda31f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Chown.java
@@ -104,7 +104,7 @@ public class Chown extends AbstractAccessTask {
*/
protected void checkConfiguration() {
if (!haveOwner) {
- throw new BuildException("Required attribute owner not set in"
+ throw new BuildException("Required attribute owner not set in"
+ " chown", getLocation());
}
super.checkConfiguration();
@@ -116,7 +116,7 @@ public class Chown extends AbstractAccessTask {
* @param e User supplied executable that we won't accept.
*/
public void setExecutable(String e) {
- throw new BuildException(taskType
+ throw new BuildException(taskType
+ " doesn\'t support the executable"
+ " attribute", getLocation());
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
index da6f2c06a..81737f06f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
@@ -564,7 +564,7 @@ public class Symlink extends Task {
}
log(cmd[0] + " " + cmd[1] + " " + cmd[2] + " " + cmd[3]);
- Execute.runCommand(this,cmd);
+ Execute.runCommand(this, cmd);
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/windows/Attrib.java b/src/main/org/apache/tools/ant/taskdefs/optional/windows/Attrib.java
index 7801720f8..4b740633e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/windows/Attrib.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/windows/Attrib.java
@@ -75,10 +75,10 @@ public class Attrib extends ExecuteOn {
private static final String ATTR_READONLY = "R";
private static final String ATTR_ARCHIVE = "A";
private static final String ATTR_SYSTEM = "S";
- private static final String ATTR_HIDDEN = "H";
- private static final String SET = "+";
- private static final String UNSET = "-";
-
+ private static final String ATTR_HIDDEN = "H";
+ private static final String SET = "+";
+ private static final String UNSET = "-";
+
private boolean haveAttr = false;
public Attrib() {
@@ -92,29 +92,29 @@ public class Attrib extends ExecuteOn {
addFileset(fs);
}
- /** set the ReadOnly file attribute */
- public void setReadonly(boolean value) {
- addArg(value, ATTR_READONLY);
+ /** set the ReadOnly file attribute */
+ public void setReadonly(boolean value) {
+ addArg(value, ATTR_READONLY);
}
- /** set the Archive file attribute */
- public void setArchive(boolean value) {
- addArg(value, ATTR_ARCHIVE);
+ /** set the Archive file attribute */
+ public void setArchive(boolean value) {
+ addArg(value, ATTR_ARCHIVE);
}
- /** set the System file attribute */
- public void setSystem(boolean value) {
- addArg(value, ATTR_SYSTEM);
+ /** set the System file attribute */
+ public void setSystem(boolean value) {
+ addArg(value, ATTR_SYSTEM);
}
- /** set the Hidden file attribute */
- public void setHidden(boolean value) {
- addArg(value, ATTR_HIDDEN);
+ /** set the Hidden file attribute */
+ public void setHidden(boolean value) {
+ addArg(value, ATTR_HIDDEN);
}
-
+
protected void checkConfiguration() {
if (!haveAttr()) {
- throw new BuildException("Missing attribute parameter",
+ throw new BuildException("Missing attribute parameter",
getLocation());
}
super.checkConfiguration();
@@ -124,18 +124,16 @@ public class Attrib extends ExecuteOn {
* @ant.attribute ignore="true"
*/
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());
}
/**
* @ant.attribute ignore="true"
*/
public void setCommand(String e) {
- throw new BuildException(taskType +
- " doesn\'t support the command attribute",
- getLocation());
+ throw new BuildException(taskType
+ + " doesn\'t support the command attribute", getLocation());
}
/**
@@ -177,17 +175,17 @@ public class Attrib extends ExecuteOn {
return Os.isFamily("windows") && super.isValidOs();
}
- private static String getSignString(boolean attr) {
+ private static String getSignString(boolean attr) {
return (attr == true ? SET : UNSET);
}
-
+
private void addArg(boolean sign, String attribute) {
createArg().setValue(getSignString(sign) + attribute);
haveAttr = true;
}
-
+
private boolean haveAttr() {
- return haveAttr;
+ return haveAttr;
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java b/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
index d231b0750..be1a4addb 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
@@ -72,7 +72,7 @@ import org.apache.tools.ant.util.JavaEnvUtils;
* @author duncan@x180.com
* @author ludovic.claude@websitewatchers.co.uk
* @author David Maclean david@cm.co.za
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
* @author Takashi Okamoto
* @since Ant 1.4
*/
@@ -96,15 +96,15 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
protected String getStubClassSuffix() {
return "_Stub";
- }
+ }
protected String getSkelClassSuffix() {
return "_Skel";
- }
+ }
protected String getTieClassSuffix() {
return "_Tie";
- }
+ }
/**
* This implementation returns a mapper that may return up to two
@@ -142,9 +142,9 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
// untouched classes are on classpath
classpath.setLocation(attributes.getBase());
- // Combine the build classpath with the system classpath, in an
+ // Combine the build classpath with the system classpath, in an
// order determined by the value of build.sysclasspath
-
+
Path cp = attributes.getClasspath();
if (cp == null) {
cp = new Path(attributes.getProject());
@@ -249,7 +249,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
}
/**
- * Logs the compilation parameters, adds the files to compile and logs the
+ * Logs the compilation parameters, adds the files to compile and logs the
* &qout;niceSourceList"
*/
protected void logAndAddFilesToCompile(Commandline cmd) {
@@ -290,22 +290,25 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
*/
private class RmicFileNameMapper implements FileNameMapper {
- RmicFileNameMapper() {}
+ RmicFileNameMapper() {
+ }
/**
* Empty implementation.
*/
- public void setFrom(String s) {}
+ public void setFrom(String s) {
+ }
/**
* Empty implementation.
*/
- public void setTo(String s) {}
+ public void setTo(String s) {
+ }
public String[] mapFileName(String name) {
if (name == null
|| !name.endsWith(".class")
- || name.endsWith(getStubClassSuffix() + ".class")
- || name.endsWith(getSkelClassSuffix() + ".class")
+ || name.endsWith(getStubClassSuffix() + ".class")
+ || name.endsWith(getSkelClassSuffix() + ".class")
|| name.endsWith(getTieClassSuffix() + ".class")) {
// Not a .class file or the one we'd generate
return null;
@@ -366,12 +369,12 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
if (c.isInterface()) {
// only stub, no tie
target = new String[] {
- dirname + "_" + filename + getStubClassSuffix()
+ dirname + "_" + filename + getStubClassSuffix()
+ ".class"
};
} else {
/*
- * stub is derived from implementation,
+ * stub is derived from implementation,
* tie from interface name.
*/
Class interf = attributes.getRemoteInterface(c);
@@ -387,17 +390,17 @@ public abstract class DefaultRmicAdapter implements RmicAdapter {
iDir = iName.substring(0, iIndex);
iDir = iDir.replace('.', File.separatorChar);
}
-
+
target = new String[] {
- dirname + "_" + filename + getTieClassSuffix()
+ dirname + "_" + filename + getTieClassSuffix()
+ ".class",
- iDir + "_" + iName.substring(iIndex)
+ iDir + "_" + iName.substring(iIndex)
+ getStubClassSuffix() + ".class"
};
}
} catch (ClassNotFoundException e) {
attributes.log("Unable to verify class " + classname
- + ". It could not be found.",
+ + ". It could not be found.",
Project.MSG_WARN);
} catch (NoClassDefFoundError e) {
attributes.log("Unable to verify class " + classname
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java b/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
index 664499650..264ebad53 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
@@ -75,8 +75,8 @@ public class KaffeRmic extends DefaultRmicAdapter {
try {
Class c = Class.forName("kaffe.rmi.rmic.RMIC");
- Constructor cons = c.getConstructor(new Class[] { String[].class });
- Object rmic = cons.newInstance(new Object[] { cmd.getArguments() });
+ Constructor cons = c.getConstructor(new Class[] {String[].class});
+ Object rmic = cons.newInstance(new Object[] {cmd.getArguments()});
Method doRmic = c.getMethod("run", null);
Boolean ok = (Boolean) doRmic.invoke(rmic, null);
@@ -85,13 +85,13 @@ public class KaffeRmic extends DefaultRmicAdapter {
throw new BuildException("Cannot use Kaffe rmic, as it is not "
+ "available. A common solution is to "
+ "set the environment variable "
- + "JAVA_HOME or CLASSPATH.",
+ + "JAVA_HOME or CLASSPATH.",
getRmic().getLocation());
} catch (Exception ex) {
if (ex instanceof BuildException) {
throw (BuildException) ex;
} else {
- throw new BuildException("Error starting Kaffe rmic: ",
+ throw new BuildException("Error starting Kaffe rmic: ",
ex, getRmic().getLocation());
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java b/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java
index afdda6265..5b6c0ceac 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java
@@ -60,7 +60,7 @@ import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.FileNameMapper;
/**
- * The interface that all rmic adapters must adher to.
+ * The interface that all rmic adapters must adher to.
*
* A rmic adapter is an adapter that interprets the rmic's
* parameters in preperation to be passed off to the compiler this
@@ -70,7 +70,7 @@ import org.apache.tools.ant.util.FileNameMapper;
* reflection).
*
* @author Takashi Okamoto
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
* @since Ant 1.4
*/
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java b/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java
index 2e901cfb4..d8e64029d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapterFactory.java
@@ -88,7 +88,7 @@ public class RmicAdapterFactory {
* @throws BuildException if the rmic type could not be resolved into
* a rmic adapter.
*/
- public static RmicAdapter getRmic(String rmicType, Task task)
+ public static RmicAdapter getRmic(String rmicType, Task task)
throws BuildException {
if (rmicType.equalsIgnoreCase("sun")) {
return new SunRmic();
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java b/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
index 0007e5ab4..df4cb1f49 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
@@ -82,11 +82,12 @@ public class SunRmic extends DefaultRmicAdapter {
try {
Class c = Class.forName("sun.rmi.rmic.Main");
- Constructor cons = c.getConstructor(new Class[] { OutputStream.class, String.class });
- Object rmic = cons.newInstance(new Object[] { logstr, "rmic" });
+ Constructor cons
+ = c.getConstructor(new Class[] {OutputStream.class, String.class});
+ Object rmic = cons.newInstance(new Object[] {logstr, "rmic"});
Method doRmic = c.getMethod("compile",
- new Class [] { String[].class });
+ new Class [] {String[].class});
Boolean ok =
(Boolean) doRmic.invoke(rmic,
(new Object[] {cmd.getArguments()}));
diff --git a/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java b/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
index 8f709c8f4..e65b68af1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/WLRmic.java
@@ -84,8 +84,8 @@ public class WLRmic extends DefaultRmicAdapter {
c = Class.forName("weblogic.rmic", true, loader);
}
Method doRmic = c.getMethod("main",
- new Class [] { String[].class });
- doRmic.invoke(null, new Object[] {cmd.getArguments() });
+ new Class [] {String[].class});
+ doRmic.invoke(null, new Object[] {cmd.getArguments()});
return true;
} catch (ClassNotFoundException ex) {
throw new BuildException("Cannot use WebLogic rmic, as it is not "
diff --git a/src/main/org/apache/tools/ant/types/AbstractFileSet.java b/src/main/org/apache/tools/ant/types/AbstractFileSet.java
index f4c82f65b..77f22c210 100644
--- a/src/main/org/apache/tools/ant/types/AbstractFileSet.java
+++ b/src/main/org/apache/tools/ant/types/AbstractFileSet.java
@@ -401,13 +401,13 @@ public abstract class AbstractFileSet extends DataType implements Cloneable,
defaultPatterns.append((PatternSet) o, p);
}
- p.log(getDataTypeName() + ": Setup scanner in dir " + dir +
- " with " + defaultPatterns, Project.MSG_DEBUG);
+ p.log(getDataTypeName() + ": Setup scanner in dir " + dir
+ + " with " + defaultPatterns, Project.MSG_DEBUG);
ds.setIncludes(defaultPatterns.getIncludePatterns(p));
ds.setExcludes(defaultPatterns.getExcludePatterns(p));
if (ds instanceof SelectorScanner) {
- SelectorScanner ss = (SelectorScanner)ds;
+ SelectorScanner ss = (SelectorScanner) ds;
ss.setSelectors(getSelectors(p));
}
@@ -641,7 +641,7 @@ public abstract class AbstractFileSet extends DataType implements Cloneable,
public void addDepend(DependSelector selector) {
appendSelector(selector);
}
-
+
/**
* add a regular expression selector entry on the selector list
*/
@@ -668,7 +668,7 @@ public abstract class AbstractFileSet extends DataType implements Cloneable,
StringBuffer sb = new StringBuffer();
for (int i = 0; i < files.length; i++) {
- if (i>0) {
+ if (i > 0) {
sb.append(';');
}
sb.append(files[i]);
diff --git a/src/main/org/apache/tools/ant/types/AntFilterReader.java b/src/main/org/apache/tools/ant/types/AntFilterReader.java
index 40c7a7bd6..6e3e607e3 100644
--- a/src/main/org/apache/tools/ant/types/AntFilterReader.java
+++ b/src/main/org/apache/tools/ant/types/AntFilterReader.java
@@ -136,7 +136,7 @@ public final class AntFilterReader
}
/**
- * Makes this instance in effect a reference to another AntFilterReader
+ * Makes this instance in effect a reference to another AntFilterReader
* instance.
*
* You must not set another attribute or nest elements inside
diff --git a/src/main/org/apache/tools/ant/types/Assertions.java b/src/main/org/apache/tools/ant/types/Assertions.java
index d6550a560..44575dd8c 100644
--- a/src/main/org/apache/tools/ant/types/Assertions.java
+++ b/src/main/org/apache/tools/ant/types/Assertions.java
@@ -111,7 +111,7 @@ public class Assertions extends DataType {
/**
* list of type BaseAssertion
*/
- private List assertionList=new ArrayList();
+ private List assertionList = new ArrayList();
/**
@@ -150,7 +150,7 @@ public class Assertions extends DataType {
* super.setRefid
.
*/
public void setRefid(Reference ref) {
- if (assertionList.size()>0 || enableSystemAssertions!=null) {
+ if (assertionList.size() > 0 || enableSystemAssertions != null) {
throw tooManyAttributes();
}
super.setRefid(ref);
@@ -161,14 +161,14 @@ public class Assertions extends DataType {
* @return the object that contains the assertion info
*/
private Assertions getFinalReference() {
- if (getRefid()==null) {
+ if (getRefid() == null) {
return this;
} else {
Object o = getRefid().getReferencedObject(getProject());
if (!(o instanceof Assertions)) {
throw new BuildException("reference is of wrong type");
}
- return (Assertions)o;
+ return (Assertions) o;
}
}
@@ -177,19 +177,19 @@ public class Assertions extends DataType {
* @param command
*/
public void applyAssertions(CommandlineJava command) {
- Assertions clause=getFinalReference();
+ Assertions clause = getFinalReference();
//do the system assertions
if (Boolean.TRUE.equals(clause.enableSystemAssertions)) {
- addVmArgument(command,"-enablesystemassertions");
+ addVmArgument(command, "-enablesystemassertions");
} else if (Boolean.FALSE.equals(clause.enableSystemAssertions)) {
addVmArgument(command, "-disablesystemassertions");
}
//now any inner assertions
- Iterator it= clause.assertionList.iterator();
+ Iterator it = clause.assertionList.iterator();
while (it.hasNext()) {
BaseAssertion assertion = (BaseAssertion) it.next();
- String arg=assertion.toCommand();
+ String arg = assertion.toCommand();
addVmArgument(command, arg);
}
}
@@ -260,10 +260,10 @@ public class Assertions extends DataType {
*/
public String toCommand() {
//catch invalidness
- if (getPackageName()!=null && getClassName()!=null) {
+ if (getPackageName() != null && getClassName() != null) {
throw new BuildException("Both package and class have been set");
}
- StringBuffer command=new StringBuffer(getCommandPrefix());
+ StringBuffer command = new StringBuffer(getCommandPrefix());
//see if it is a package or a class
if (getPackageName() != null) {
//packages get a ... prefix
@@ -273,7 +273,7 @@ public class Assertions extends DataType {
//append the ... suffix if not there already
command.append("...");
}
- } else if (getClassName()!=null) {
+ } else if (getClassName() != null) {
//classes just get the classname
command.append(':');
command.append(getClassName());
diff --git a/src/main/org/apache/tools/ant/types/Commandline.java b/src/main/org/apache/tools/ant/types/Commandline.java
index 96e00615e..c334a25a4 100644
--- a/src/main/org/apache/tools/ant/types/Commandline.java
+++ b/src/main/org/apache/tools/ant/types/Commandline.java
@@ -513,14 +513,14 @@ public class Commandline implements Cloneable {
*
* This method assumes that the first entry in the array is the
* executable to run.
- *
+ *
* @since Ant 1.5
*/
public static String describeCommand(String[] args) {
if (args == null || args.length == 0) {
return "";
}
-
+
StringBuffer buf = new StringBuffer("Executing \'");
buf.append(args[0]);
buf.append("\'");
diff --git a/src/main/org/apache/tools/ant/types/CommandlineJava.java b/src/main/org/apache/tools/ant/types/CommandlineJava.java
index 7457ce0b1..d05675af7 100644
--- a/src/main/org/apache/tools/ant/types/CommandlineJava.java
+++ b/src/main/org/apache/tools/ant/types/CommandlineJava.java
@@ -398,7 +398,7 @@ public class CommandlineJava implements Cloneable {
}
// jar execution requires an additional -jar option
if (executeJar) {
- size++ ;
+ size++;
}
return size;
}
diff --git a/src/main/org/apache/tools/ant/types/DataType.java b/src/main/org/apache/tools/ant/types/DataType.java
index 1eaf53bcc..c4b1b54e6 100644
--- a/src/main/org/apache/tools/ant/types/DataType.java
+++ b/src/main/org/apache/tools/ant/types/DataType.java
@@ -108,7 +108,7 @@ public abstract class DataType extends ProjectComponent {
* Sets a description of the current data type. It will be useful
* in commenting what we are doing.
*/
- public void setDescription( final String desc) {
+ public void setDescription(final String desc) {
description = desc;
}
@@ -134,7 +134,7 @@ public abstract class DataType extends ProjectComponent {
* thus override this method. if they do the must call
* super.setRefid
.
*/
- public void setRefid( final Reference ref) {
+ public void setRefid(final Reference ref) {
this.ref = ref;
checked = false;
}
@@ -155,8 +155,8 @@ public abstract class DataType extends ProjectComponent {
* anything if {@link #checked checked
} is true and
* set it to true on exit.
*/
- protected void dieOnCircularReference( final Stack stack,
- final Project project )
+ protected void dieOnCircularReference(final Stack stack,
+ final Project project)
throws BuildException {
if (checked || !isReference()) {
@@ -180,8 +180,8 @@ public abstract class DataType extends ProjectComponent {
* Performs the check for circular references and returns the
* referenced object.
*/
- protected Object getCheckedRef( final Class requiredClass,
- final String dataTypeName) {
+ protected Object getCheckedRef(final Class requiredClass,
+ final String dataTypeName) {
if (!checked) {
Stack stk = new Stack();
stk.push(this);
@@ -228,7 +228,7 @@ public abstract class DataType extends ProjectComponent {
return checked;
}
- protected void setChecked( final boolean checked) {
+ protected void setChecked(final boolean checked) {
this.checked = checked;
}
diff --git a/src/main/org/apache/tools/ant/types/DirSet.java b/src/main/org/apache/tools/ant/types/DirSet.java
index d3d8e5834..e2199d8c3 100644
--- a/src/main/org/apache/tools/ant/types/DirSet.java
+++ b/src/main/org/apache/tools/ant/types/DirSet.java
@@ -61,7 +61,7 @@ package org.apache.tools.ant.types;
* @since Ant 1.5
*/
public class DirSet extends AbstractFileSet {
-
+
public DirSet() {
super();
}
diff --git a/src/main/org/apache/tools/ant/types/FileSet.java b/src/main/org/apache/tools/ant/types/FileSet.java
index 99b7b1b00..13cb35c6e 100644
--- a/src/main/org/apache/tools/ant/types/FileSet.java
+++ b/src/main/org/apache/tools/ant/types/FileSet.java
@@ -58,7 +58,7 @@ package org.apache.tools.ant.types;
* Moved out of MatchingTask to make it a standalone object that could
* be referenced (by scripts for example).
*
- * @author Arnout J. Kuiper ajkuiper@wxs.nl
+ * @author Arnout J. Kuiper ajkuiper@wxs.nl
* @author Stefano Mazzocchi stefano@apache.org
* @author Sam Ruby rubys@us.ibm.com
* @author Jon S. Stevens jon@clearink.com
@@ -66,7 +66,7 @@ package org.apache.tools.ant.types;
* @author Magesh Umasankar
*/
public class FileSet extends AbstractFileSet {
-
+
public FileSet() {
super();
}
diff --git a/src/main/org/apache/tools/ant/types/FilterSetCollection.java b/src/main/org/apache/tools/ant/types/FilterSetCollection.java
index c50caa2d7..af79025e7 100644
--- a/src/main/org/apache/tools/ant/types/FilterSetCollection.java
+++ b/src/main/org/apache/tools/ant/types/FilterSetCollection.java
@@ -74,21 +74,21 @@ import java.util.Vector;
* @author Conor MacNeill
*/
public class FilterSetCollection {
-
+
private Vector filterSets = new Vector();
public FilterSetCollection() {
}
-
+
public FilterSetCollection(FilterSet filterSet) {
addFilterSet(filterSet);
}
-
-
+
+
public void addFilterSet(FilterSet filterSet) {
filterSets.addElement(filterSet);
}
-
+
/**
* Does replacement on the given string with token matching.
* This uses the defined begintoken and endtoken values which default to @ for both.
@@ -104,7 +104,7 @@ public class FilterSetCollection {
}
return replacedLine;
}
-
+
/**
* Test to see if this filter set it empty.
*
@@ -120,6 +120,6 @@ public class FilterSetCollection {
return false;
}
}
-
+
diff --git a/src/main/org/apache/tools/ant/types/Mapper.java b/src/main/org/apache/tools/ant/types/Mapper.java
index 95a48da2f..852a31e44 100644
--- a/src/main/org/apache/tools/ant/types/Mapper.java
+++ b/src/main/org/apache/tools/ant/types/Mapper.java
@@ -204,8 +204,8 @@ public class Mapper extends DataType implements Cloneable {
FileNameMapper m = (FileNameMapper) c.newInstance();
final Project project = getProject();
- if ( project != null) {
- project.setProjectReference( m );
+ if (project != null) {
+ project.setProjectReference(m);
}
m.setFrom(from);
m.setTo(to);
diff --git a/src/main/org/apache/tools/ant/types/Path.java b/src/main/org/apache/tools/ant/types/Path.java
index 62ef52083..6f5657022 100644
--- a/src/main/org/apache/tools/ant/types/Path.java
+++ b/src/main/org/apache/tools/ant/types/Path.java
@@ -654,7 +654,8 @@ public class Path extends DataType implements Cloneable {
// IBM's 1.4 has rt.jar split into 4 smaller jars and a combined
// JCE/JSSE in security.jar.
- String[] ibmJars = { "core", "graphics", "security", "server", "xml" };
+ String[] ibmJars
+ = {"core", "graphics", "security", "server", "xml"};
for (int i = 0; i < ibmJars.length; i++) {
addExisting(new Path(null,
System.getProperty("java.home")
diff --git a/src/main/org/apache/tools/ant/types/PropertySet.java b/src/main/org/apache/tools/ant/types/PropertySet.java
index 2c5927134..fa285c9cd 100644
--- a/src/main/org/apache/tools/ant/types/PropertySet.java
+++ b/src/main/org/apache/tools/ant/types/PropertySet.java
@@ -115,8 +115,8 @@ public class PropertySet extends DataType {
}
if (++count != 1) {
- throw new BuildException("Attributes name, regex, and " +
- "prefix are mutually exclusive");
+ throw new BuildException("Attributes name, regex, and "
+ + "prefix are mutually exclusive");
}
}
diff --git a/src/main/org/apache/tools/ant/types/Reference.java b/src/main/org/apache/tools/ant/types/Reference.java
index 844743b6a..acaaee6ac 100644
--- a/src/main/org/apache/tools/ant/types/Reference.java
+++ b/src/main/org/apache/tools/ant/types/Reference.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -87,7 +87,7 @@ public class Reference {
if (refid == null) {
throw new BuildException("No reference specified");
}
-
+
Object o = project.getReference(refid);
if (o == null) {
throw new BuildException("Reference " + refid + " not found.");
diff --git a/src/main/org/apache/tools/ant/types/RegularExpression.java b/src/main/org/apache/tools/ant/types/RegularExpression.java
index e58f20388..bd76aed9e 100644
--- a/src/main/org/apache/tools/ant/types/RegularExpression.java
+++ b/src/main/org/apache/tools/ant/types/RegularExpression.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -83,7 +83,7 @@ import org.apache.tools.ant.util.regexp.RegexpFactory;
*
*
*
- * <regexp [ [id="id"] pattern="expression" | refid="id" ]
+ * <regexp [ [id="id"] pattern="expression" | refid="id" ]
* />
*
*
@@ -143,7 +143,7 @@ public class RegularExpression extends DataType {
dieOnCircularReference(stk, p);
}
-
+
Object o = getRefid().getReferencedObject(p);
if (!(o instanceof RegularExpression)) {
String msg = getRefid().getRefId() + " doesn\'t denote a "
diff --git a/src/main/org/apache/tools/ant/types/Substitution.java b/src/main/org/apache/tools/ant/types/Substitution.java
index 8dc5428a9..398395918 100644
--- a/src/main/org/apache/tools/ant/types/Substitution.java
+++ b/src/main/org/apache/tools/ant/types/Substitution.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -63,7 +63,7 @@ import org.apache.tools.ant.Project;
* that is meant to replace a regular expression.
*
*
- * <substitition [ [id="id"] expression="expression" | refid="id" ]
+ * <substitition [ [id="id"] expression="expression" | refid="id" ]
* />
*
*
@@ -107,7 +107,7 @@ public class Substitution extends DataType {
dieOnCircularReference(stk, p);
}
-
+
Object o = getRefid().getReferencedObject(p);
if (!(o instanceof Substitution)) {
String msg = getRefid().getRefId() + " doesn\'t denote a substitution";
diff --git a/src/main/org/apache/tools/ant/types/optional/depend/ClassfileSet.java b/src/main/org/apache/tools/ant/types/optional/depend/ClassfileSet.java
index dbbef6fb5..e781a78e8 100644
--- a/src/main/org/apache/tools/ant/types/optional/depend/ClassfileSet.java
+++ b/src/main/org/apache/tools/ant/types/optional/depend/ClassfileSet.java
@@ -70,9 +70,9 @@ import org.apache.tools.ant.types.FileSet;
* @author Holger Engels
*/
public class ClassfileSet extends FileSet {
- /**
- * The list of root classes for this class file set. These are the
- * classes which must be included in the fileset and which are the
+ /**
+ * The list of root classes for this class file set. These are the
+ * classes which must be included in the fileset and which are the
* starting point for the dependency search.
*/
private Vector rootClasses = new Vector();
@@ -81,23 +81,23 @@ public class ClassfileSet extends FileSet {
* The list of filesets which contain root classes
*/
private Vector rootFileSets = new Vector();
-
+
/**
* Inner class used to contain info about root classes
*/
public static class ClassRoot {
/** The name of the root class */
private String rootClass;
-
- /**
- * Set the root class name
+
+ /**
+ * Set the root class name
*
- * @param name the name of the root class
+ * @param name the name of the root class
*/
public void setClassname(String name) {
this.rootClass = name;
}
-
+
/**
* Get the name of the root class
*
@@ -113,10 +113,10 @@ public class ClassfileSet extends FileSet {
*/
public ClassfileSet() {
}
-
+
/**
- * Add a fileset to which contains a collection of root classes used to
- * drive the search from classes
+ * Add a fileset to which contains a collection of root classes used to
+ * drive the search from classes
*
* @param rootFileSet a root file set to be used to search for dependent
* classes
@@ -124,7 +124,7 @@ public class ClassfileSet extends FileSet {
public void addRootFileset(FileSet rootFileSet) {
rootFileSets.addElement(rootFileSet);
}
-
+
/**
* Create a ClassfileSet from another ClassfileSet
*
@@ -164,31 +164,31 @@ public class ClassfileSet extends FileSet {
String[] files = additionalScanner.getIncludedFiles();
for (int i = 0; i < files.length; ++i) {
if (files[i].endsWith(".class")) {
- String classFilePath
+ String classFilePath
= files[i].substring(0, files[i].length() - 6);
- String className
+ String className
= classFilePath.replace('/', '.').replace('\\', '.');
allRootClasses.addElement(className);
}
}
- }
-
-
+ }
+
+
DirectoryScanner parentScanner = super.getDirectoryScanner(p);
DependScanner scanner = new DependScanner(parentScanner);
scanner.setBasedir(getDir(p));
scanner.setRootClasses(allRootClasses);
scanner.scan();
return scanner;
- }
-
- /**
+ }
+
+ /**
* Add a nested root class definition to this class file set
*
* @param root the configured class root.
*/
public void addConfiguredRoot(ClassRoot root) {
- rootClasses.addElement(root.getClassname());
+ rootClasses.addElement(root.getClassname());
}
/**
diff --git a/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java b/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java
index af2f240cb..fcefd7cb0 100644
--- a/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java
+++ b/src/main/org/apache/tools/ant/types/optional/depend/DependScanner.java
@@ -64,7 +64,7 @@ import org.apache.tools.ant.util.depend.DependencyAnalyzer;
/**
- * An interface used to describe the actions required by any type of
+ * An interface used to describe the actions required by any type of
* directory scanner.
*
* @author Conor MacNeill
@@ -81,35 +81,35 @@ public class DependScanner extends DirectoryScanner {
* The base directory for the scan
*/
private File basedir;
-
+
/**
* The root classes to drive the search for dependent classes
*/
private Vector rootClasses;
-
+
/**
* The names of the classes to include in the fileset
*/
private Vector included;
/**
- * The parent scanner which gives the basic set of files. Only files which
+ * The parent scanner which gives the basic set of files. Only files which
* are in this set and which can be reached from a root class will end
* up being included in the result set
*/
private DirectoryScanner parentScanner;
-
+
/**
- * Create a DependScanner, using the given scanner to provide the basic
+ * Create a DependScanner, using the given scanner to provide the basic
* set of files from which class files come.
*
- * @param parentScanner the DirectoryScanner which returns the files from
+ * @param parentScanner the DirectoryScanner which returns the files from
* which class files must come.
*/
public DependScanner(DirectoryScanner parentScanner) {
this.parentScanner = parentScanner;
}
-
+
/**
* Sets the basedir for scanning. This is the directory that is scanned
* recursively.
@@ -145,7 +145,7 @@ public class DependScanner extends DirectoryScanner {
int count = included.size();
String[] files = new String[count];
for (int i = 0; i < count; i++) {
- files[i] = (String) included.elementAt(i);
+ files[i] = (String) included.elementAt(i);
}
return files;
}
@@ -163,11 +163,11 @@ public class DependScanner extends DirectoryScanner {
Class analyzerClass = Class.forName(analyzerClassName);
analyzer = (DependencyAnalyzer) analyzerClass.newInstance();
} catch (Exception e) {
- throw new BuildException("Unable to load dependency analyzer: "
+ throw new BuildException("Unable to load dependency analyzer: "
+ analyzerClassName, e);
}
analyzer.addClassPath(new Path(null, basedir.getPath()));
-
+
for (Enumeration e = rootClasses.elements(); e.hasMoreElements();) {
String rootClass = (String) e.nextElement();
analyzer.addRootClass(rootClass);
@@ -198,40 +198,40 @@ public class DependScanner extends DirectoryScanner {
*/
public void addDefaultExcludes() {
}
-
+
/**
* @see DirectoryScanner#getExcludedDirectories
*/
- public String[] getExcludedDirectories() {
- return null;
+ public String[] getExcludedDirectories() {
+ return null;
}
-
+
/**
* @see DirectoryScanner#getExcludedFiles
*/
- public String[] getExcludedFiles() {
- return null;
+ public String[] getExcludedFiles() {
+ return null;
}
-
+
/**
* @see DirectoryScanner#getIncludedDirectories
*/
- public String[] getIncludedDirectories() {
- return new String[0];
+ public String[] getIncludedDirectories() {
+ return new String[0];
}
-
+
/**
* @see DirectoryScanner#getNotIncludedDirectories
*/
- public String[] getNotIncludedDirectories() {
- return null;
+ public String[] getNotIncludedDirectories() {
+ return null;
}
-
+
/**
* @see DirectoryScanner#getNotIncludedFiles
*/
- public String[] getNotIncludedFiles() {
- return null;
+ public String[] getNotIncludedFiles() {
+ return null;
}
/**
@@ -239,13 +239,13 @@ public class DependScanner extends DirectoryScanner {
*/
public void setExcludes(String[] excludes) {
}
-
+
/**
* @see DirectoryScanner#setIncludes
*/
public void setIncludes(String[] includes) {
}
-
+
/**
* @see DirectoryScanner#setCaseSensitive
*/
diff --git a/src/main/org/apache/tools/ant/types/optional/image/Draw.java b/src/main/org/apache/tools/ant/types/optional/image/Draw.java
index 29634ee13..49246c327 100644
--- a/src/main/org/apache/tools/ant/types/optional/image/Draw.java
+++ b/src/main/org/apache/tools/ant/types/optional/image/Draw.java
@@ -54,7 +54,7 @@
package org.apache.tools.ant.types.optional.image;
import javax.media.jai.PlanarImage;
-import java.awt.*;
+//import java.awt.*;
import java.awt.image.BufferedImage;
/**
@@ -93,16 +93,17 @@ public class Draw extends TransformOperation {
public PlanarImage executeTransformOperation(PlanarImage image) {
BufferedImage bi = image.getAsBufferedImage();
- Graphics2D graphics = (Graphics2D)bi.getGraphics();
+ Graphics2D graphics = (Graphics2D) bi.getGraphics();
- for (int i=0; i -1 && depth < min) {
return false;
diff --git a/src/main/org/apache/tools/ant/types/selectors/ExtendSelector.java b/src/main/org/apache/tools/ant/types/selectors/ExtendSelector.java
index 125d9a277..6416455f3 100644
--- a/src/main/org/apache/tools/ant/types/selectors/ExtendSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/ExtendSelector.java
@@ -112,14 +112,14 @@ public class ExtendSelector extends BaseSelector {
project.setProjectReference(dynselector);
}
} catch (ClassNotFoundException cnfexcept) {
- setError("Selector " + classname +
- " not initialized, no such class");
+ setError("Selector " + classname
+ + " not initialized, no such class");
} catch (InstantiationException iexcept) {
- setError("Selector " + classname +
- " not initialized, could not create class");
+ setError("Selector " + classname
+ + " not initialized, could not create class");
} catch (IllegalAccessException iaexcept) {
- setError("Selector " + classname +
- " not initialized, class not accessible");
+ setError("Selector " + classname
+ + " not initialized, class not accessible");
}
} else {
setError("There is no classname specified");
diff --git a/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java b/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java
index 7a91afa06..e644350e4 100644
--- a/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java
+++ b/src/main/org/apache/tools/ant/types/selectors/SelectSelector.java
@@ -169,8 +169,8 @@ public class SelectSelector extends BaseSelectorContainer {
public void verifySettings() {
int cnt = selectorCount();
if (cnt < 0 || cnt > 1) {
- setError("Only one selector is allowed within the " +
- " tag");
+ setError("Only one selector is allowed within the "
+ + " tag");
}
}
diff --git a/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java b/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
index 8b23fca6f..ec8dcb186 100644
--- a/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
+++ b/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
@@ -543,7 +543,7 @@ public final class SelectorUtils {
*/
public static Vector tokenizePath (String path, String separator) {
Vector ret = new Vector();
- StringTokenizer st = new StringTokenizer(path,separator);
+ StringTokenizer st = new StringTokenizer(path, separator);
while (st.hasMoreTokens()) {
ret.addElement(st.nextToken());
}
@@ -669,7 +669,7 @@ public final class SelectorUtils {
* @return true if the string contains at least a star or a question mark
*/
public static boolean hasWildcards(String input) {
- return (input.indexOf('*')!=-1 || input.indexOf('?')!=-1);
+ return (input.indexOf('*') != -1 || input.indexOf('?') != -1);
}
/**
@@ -680,14 +680,14 @@ public final class SelectorUtils {
public static String rtrimWildcardTokens(String input) {
Vector v = tokenizePath(input, File.separator);
StringBuffer sb = new StringBuffer();
- for (int counter=0; counter < v.size() ; counter++) {
- if ( hasWildcards((String)v.elementAt(counter))) {
+ for (int counter = 0; counter < v.size(); counter++) {
+ if (hasWildcards((String) v.elementAt(counter))) {
break;
}
- if (counter >0) {
+ if (counter > 0) {
sb.append(File.separator);
}
- sb.append((String)v.elementAt(counter));
+ sb.append((String) v.elementAt(counter));
}
return sb.toString();
}
diff --git a/src/main/org/apache/tools/ant/util/ClasspathUtils.java b/src/main/org/apache/tools/ant/util/ClasspathUtils.java
index 23d6dabea..b08a8fc60 100644
--- a/src/main/org/apache/tools/ant/util/ClasspathUtils.java
+++ b/src/main/org/apache/tools/ant/util/ClasspathUtils.java
@@ -212,8 +212,8 @@ public class ClasspathUtils {
Object reusedLoader = p.getReference(loaderId);
if (reusedLoader != null &&
!(reusedLoader instanceof ClassLoader)) {
- throw new BuildException("The specified loader id " + loaderId +
- " does not reference a class loader");
+ throw new BuildException("The specified loader id " + loaderId
+ + " does not reference a class loader");
}
cl = (ClassLoader) reusedLoader;
@@ -437,13 +437,12 @@ public class ClasspathUtils {
*/
public ClassLoader getClassLoader() {
ClassLoader cl;
- cl= ClasspathUtils.getClassLoaderForPath(
+ cl = ClasspathUtils.getClassLoaderForPath(
getContextProject(),
this.classpath,
getClassLoadId(),
this.reverseLoader,
- loaderId != null
- || isMagicPropertySet(getContextProject()));
+ loaderId != null || isMagicPropertySet(getContextProject()));
return cl;
}
diff --git a/src/main/org/apache/tools/ant/util/CollectionUtils.java b/src/main/org/apache/tools/ant/util/CollectionUtils.java
index f793a621a..4224df497 100644
--- a/src/main/org/apache/tools/ant/util/CollectionUtils.java
+++ b/src/main/org/apache/tools/ant/util/CollectionUtils.java
@@ -152,10 +152,13 @@ public class CollectionUtils {
* @since Ant 1.6
*/
public static final class EmptyEnumeration implements Enumeration {
- public EmptyEnumeration() {}
+ public EmptyEnumeration() {
+ }
+
public boolean hasMoreElements() {
return false;
}
+
public Object nextElement() throws NoSuchElementException {
throw new NoSuchElementException();
}
diff --git a/src/main/org/apache/tools/ant/util/DOMElementWriter.java b/src/main/org/apache/tools/ant/util/DOMElementWriter.java
index a11a4efb3..0f6c96b56 100644
--- a/src/main/org/apache/tools/ant/util/DOMElementWriter.java
+++ b/src/main/org/apache/tools/ant/util/DOMElementWriter.java
@@ -108,11 +108,11 @@ public class DOMElementWriter {
*
* @param element the Root DOM element of the tree
* @param out where to send the output
- * @param indent number of
+ * @param indent number of
* @param indentWith string that should be used to indent the corresponding tag.
* @throws IOException if an error happens while writing to the stream.
*/
- public void write(Element element, Writer out, int indent,
+ public void write(Element element, Writer out, int indent,
String indentWith)
throws IOException {
@@ -144,7 +144,7 @@ public class DOMElementWriter {
Node child = children.item(i);
switch (child.getNodeType()) {
-
+
case Node.ELEMENT_NODE:
if (!hasChildren) {
out.write(lSep);
@@ -152,11 +152,11 @@ public class DOMElementWriter {
}
write((Element) child, out, indent + 1, indentWith);
break;
-
+
case Node.TEXT_NODE:
out.write(encode(child.getNodeValue()));
break;
-
+
case Node.CDATA_SECTION_NODE:
out.write("");
}
-
+
return result;
}
diff --git a/src/main/org/apache/tools/ant/util/FileNameMapper.java b/src/main/org/apache/tools/ant/util/FileNameMapper.java
index d8f66ee5e..fe3e0b561 100644
--- a/src/main/org/apache/tools/ant/util/FileNameMapper.java
+++ b/src/main/org/apache/tools/ant/util/FileNameMapper.java
@@ -84,7 +84,7 @@ public interface FileNameMapper {
*
* if the given rule doesn't apply to the source file,
* implementation must return null. SourceFileScanner will then
- * omit the source file in question.
+ * omit the source file in question.
*
* @param sourceFileName the name of the source file relative to
* some given basedirectory.
diff --git a/src/main/org/apache/tools/ant/util/FlatFileNameMapper.java b/src/main/org/apache/tools/ant/util/FlatFileNameMapper.java
index 5d0292766..6d1fd489e 100644
--- a/src/main/org/apache/tools/ant/util/FlatFileNameMapper.java
+++ b/src/main/org/apache/tools/ant/util/FlatFileNameMapper.java
@@ -68,12 +68,14 @@ public class FlatFileNameMapper implements FileNameMapper {
/**
* Ignored.
*/
- public void setFrom(String from) {}
+ public void setFrom(String from) {
+ }
/**
* Ignored.
*/
- public void setTo(String to) {}
+ public void setTo(String to) {
+ }
/**
* Returns an one-element array containing the source file name
diff --git a/src/main/org/apache/tools/ant/util/GlobPatternMapper.java b/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
index dc0ab141e..dab006e68 100644
--- a/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
+++ b/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
@@ -78,7 +78,7 @@ public class GlobPatternMapper implements FileNameMapper {
* Part of "from" pattern after the *.
*/
protected String fromPostfix = null;
-
+
/**
* Length of the prefix ("from" pattern).
*/
@@ -98,7 +98,7 @@ public class GlobPatternMapper implements FileNameMapper {
* Part of "to" pattern after the *.
*/
protected String toPostfix = null;
-
+
/**
* Sets the "from" pattern. Required.
*/
@@ -135,12 +135,12 @@ public class GlobPatternMapper implements FileNameMapper {
* translated file otherwise.
*/
public String[] mapFileName(String sourceFileName) {
- if (fromPrefix == null
- || !sourceFileName.startsWith(fromPrefix)
+ if (fromPrefix == null
+ || !sourceFileName.startsWith(fromPrefix)
|| !sourceFileName.endsWith(fromPostfix)) {
return null;
}
- return new String[] {toPrefix
+ return new String[] {toPrefix
+ extractVariablePart(sourceFileName)
+ toPostfix};
}
diff --git a/src/main/org/apache/tools/ant/util/IdentityMapper.java b/src/main/org/apache/tools/ant/util/IdentityMapper.java
index 0de5e0e9d..864187698 100644
--- a/src/main/org/apache/tools/ant/util/IdentityMapper.java
+++ b/src/main/org/apache/tools/ant/util/IdentityMapper.java
@@ -67,12 +67,14 @@ public class IdentityMapper implements FileNameMapper {
/**
* Ignored.
*/
- public void setFrom(String from) {}
+ public void setFrom(String from) {
+ }
/**
* Ignored.
*/
- public void setTo(String to) {}
+ public void setTo(String to) {
+ }
/**
* Returns an one-element array containing the source file name.
diff --git a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
index 738a64adc..2f1266b1e 100644
--- a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
+++ b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
@@ -112,7 +112,7 @@ public class JavaEnvUtils {
try {
javaVersion = JAVA_1_0;
- javaVersionNumber=10;
+ javaVersionNumber = 10;
Class.forName("java.lang.Void");
javaVersion = JAVA_1_1;
javaVersionNumber++;
@@ -273,7 +273,7 @@ public class JavaEnvUtils {
*/
private static void buildJrePackages() {
- jrePackages=new Vector();
+ jrePackages = new Vector();
switch(javaVersionNumber) {
case 14:
jrePackages.addElement("org.apache.crimson");
@@ -314,7 +314,7 @@ public class JavaEnvUtils {
* Testing helper method; kept here for unification of changes.
*/
public static Vector getJrePackageTestCases() {
- Vector tests=new Vector();
+ Vector tests = new Vector();
tests.addElement("java.lang.Object");
switch(javaVersionNumber) {
case 14:
@@ -358,7 +358,7 @@ public class JavaEnvUtils {
* @return list of packages
*/
public static Vector getJrePackages() {
- if (jrePackages==null) {
+ if (jrePackages == null) {
buildJrePackages();
}
return jrePackages;
diff --git a/src/main/org/apache/tools/ant/util/LazyHashtable.java b/src/main/org/apache/tools/ant/util/LazyHashtable.java
index ca37a2653..caeff380a 100644
--- a/src/main/org/apache/tools/ant/util/LazyHashtable.java
+++ b/src/main/org/apache/tools/ant/util/LazyHashtable.java
@@ -65,7 +65,7 @@ import java.util.Enumeration;
* @since Ant 1.6
*/
public class LazyHashtable extends Hashtable {
- protected boolean initAllDone=false;
+ protected boolean initAllDone = false;
public LazyHashtable() {
super();
@@ -76,8 +76,10 @@ public class LazyHashtable extends Hashtable {
* just get the tasks that we need, and avoid costly init.
*/
protected void initAll() {
- if (initAllDone ) return;
- initAllDone=true;
+ if (initAllDone) {
+ return;
+ }
+ initAllDone = true;
}
@@ -96,7 +98,7 @@ public class LazyHashtable extends Hashtable {
return super.size();
}
- public boolean contains( Object value) {
+ public boolean contains(Object value) {
initAll();
return super.contains(value);
}
@@ -109,7 +111,7 @@ public class LazyHashtable extends Hashtable {
/**
* Delegates to {@link #contains contains}.
*/
- public boolean containsValue( Object value) {
+ public boolean containsValue(Object value) {
return contains(value);
}
diff --git a/src/main/org/apache/tools/ant/util/LoaderUtils.java b/src/main/org/apache/tools/ant/util/LoaderUtils.java
index 36ceb9989..16d7f3a3e 100644
--- a/src/main/org/apache/tools/ant/util/LoaderUtils.java
+++ b/src/main/org/apache/tools/ant/util/LoaderUtils.java
@@ -56,7 +56,6 @@ package org.apache.tools.ant.util;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.net.URL;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.launch.Locator;
diff --git a/src/main/org/apache/tools/ant/util/MergingMapper.java b/src/main/org/apache/tools/ant/util/MergingMapper.java
index e32d20a80..31630f85a 100644
--- a/src/main/org/apache/tools/ant/util/MergingMapper.java
+++ b/src/main/org/apache/tools/ant/util/MergingMapper.java
@@ -69,7 +69,8 @@ public class MergingMapper implements FileNameMapper {
/**
* Ignored.
*/
- public void setFrom(String from) {}
+ public void setFrom(String from) {
+ }
/**
* Sets the name of the merged file.
diff --git a/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java b/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java
index 366cacf84..43a5d1307 100644
--- a/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java
+++ b/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java
@@ -73,7 +73,7 @@ public class RegexpPatternMapper implements FileNameMapper {
public RegexpPatternMapper() throws BuildException {
reg = (new RegexpMatcherFactory()).newRegexpMatcher();
}
-
+
/**
* Sets the "from" pattern. Required.
*/
@@ -114,7 +114,7 @@ public class RegexpPatternMapper implements FileNameMapper {
*/
protected String replaceReferences(String source) {
Vector v = reg.getGroups(source);
-
+
result.setLength(0);
for (int i = 0; i < to.length; i++) {
if (to[i] == '\\') {
diff --git a/src/main/org/apache/tools/ant/util/ResourceUtils.java b/src/main/org/apache/tools/ant/util/ResourceUtils.java
index 5ac85a7c7..35394b7ef 100644
--- a/src/main/org/apache/tools/ant/util/ResourceUtils.java
+++ b/src/main/org/apache/tools/ant/util/ResourceUtils.java
@@ -157,7 +157,7 @@ public class ResourceUtils {
Project.MSG_VERBOSE);
}
}
- Resource[] result= new Resource[vresult.size()];
+ Resource[] result = new Resource[vresult.size()];
vresult.copyInto(result);
return result;
}
diff --git a/src/main/org/apache/tools/ant/util/SourceFileScanner.java b/src/main/org/apache/tools/ant/util/SourceFileScanner.java
index db6b25226..2bb158759 100644
--- a/src/main/org/apache/tools/ant/util/SourceFileScanner.java
+++ b/src/main/org/apache/tools/ant/util/SourceFileScanner.java
@@ -107,16 +107,16 @@ public class SourceFileScanner implements ResourceFactory {
v.addElement(new Resource(files[i], src.exists(),
src.lastModified(), src.isDirectory()));
}
- Resource[] sourceresources= new Resource[v.size()];
+ Resource[] sourceresources = new Resource[v.size()];
v.copyInto(sourceresources);
// build the list of sources which are out of date with
// respect to the target
- Resource[] outofdate =
+ Resource[] outofdate =
ResourceUtils.selectOutOfDateSources(task, sourceresources,
mapper, this);
String[] result = new String[outofdate.length];
- for (int counter=0; counter < outofdate.length; counter++) {
+ for (int counter = 0; counter < outofdate.length; counter++) {
result[counter] = outofdate[counter].getName();
}
return result;
diff --git a/src/main/org/apache/tools/ant/util/TaskLogger.java b/src/main/org/apache/tools/ant/util/TaskLogger.java
index 55ea41303..d5747a5a1 100644
--- a/src/main/org/apache/tools/ant/util/TaskLogger.java
+++ b/src/main/org/apache/tools/ant/util/TaskLogger.java
@@ -68,27 +68,27 @@ public final class TaskLogger {
*/
private Task m_task;
- public TaskLogger( final Task task) {
+ public TaskLogger(final Task task) {
this.m_task = task;
}
- public void info( final String message) {
- m_task.log( message, Project.MSG_INFO );
+ public void info(final String message) {
+ m_task.log(message, Project.MSG_INFO);
}
- public void error( final String message) {
- m_task.log( message, Project.MSG_ERR );
+ public void error(final String message) {
+ m_task.log(message, Project.MSG_ERR);
}
- public void warning( final String message) {
- m_task.log( message, Project.MSG_WARN );
+ public void warning(final String message) {
+ m_task.log(message, Project.MSG_WARN);
}
- public void verbose( final String message) {
- m_task.log( message, Project.MSG_VERBOSE );
+ public void verbose(final String message) {
+ m_task.log(message, Project.MSG_VERBOSE);
}
- public void debug( final String message) {
- m_task.log( message, Project.MSG_DEBUG );
+ public void debug(final String message) {
+ m_task.log(message, Project.MSG_DEBUG);
}
}
diff --git a/src/main/org/apache/tools/ant/util/TeeOutputStream.java b/src/main/org/apache/tools/ant/util/TeeOutputStream.java
index fe5c24276..028064f64 100644
--- a/src/main/org/apache/tools/ant/util/TeeOutputStream.java
+++ b/src/main/org/apache/tools/ant/util/TeeOutputStream.java
@@ -65,17 +65,17 @@ import java.io.IOException;
public class TeeOutputStream extends OutputStream {
private OutputStream left;
private OutputStream right;
-
+
public TeeOutputStream(OutputStream left, OutputStream right) {
this.left = left;
this.right = right;
}
-
+
public void close() throws IOException {
left.close();
right.close();
}
-
+
public void flush() throws IOException {
left.flush();
right.flush();
@@ -85,12 +85,12 @@ public class TeeOutputStream extends OutputStream {
left.write(b);
right.write(b);
}
-
+
public void write(byte[] b, int off, int len) throws IOException {
left.write(b, off, len);
right.write(b, off, len);
}
-
+
public void write(int b) throws IOException {
left.write(b);
right.write(b);
diff --git a/src/main/org/apache/tools/ant/util/WeakishReference.java b/src/main/org/apache/tools/ant/util/WeakishReference.java
index 63a14684d..bacbea4cc 100644
--- a/src/main/org/apache/tools/ant/util/WeakishReference.java
+++ b/src/main/org/apache/tools/ant/util/WeakishReference.java
@@ -68,7 +68,8 @@ public abstract class WeakishReference {
private static Constructor referenceConstructor;
- private final static String WEAK_REFERENCE_NAME= "org.apache.tools.ant.util.optional.WeakishReference12";
+ private final static String WEAK_REFERENCE_NAME
+ = "org.apache.tools.ant.util.optional.WeakishReference12";
/**
* create the appropriate type of reference for the java version
@@ -76,14 +77,14 @@ public abstract class WeakishReference {
* @return reference to the Object.
*/
public static WeakishReference createReference(Object object) {
- if (referenceConstructor==null) {
+ if (referenceConstructor == null) {
createReferenceConstructor();
}
try {
- return (WeakishReference)referenceConstructor
+ return (WeakishReference) referenceConstructor
.newInstance(new Object[]{object});
} catch (Exception e) {
- throw new BuildException("while creating a weakish reference",e);
+ throw new BuildException("while creating a weakish reference", e);
}
}
@@ -91,20 +92,22 @@ public abstract class WeakishReference {
* create the appropriate constructor method for the
*/
private static void createReferenceConstructor() {
- Class[] ctor=new Class[]{Object.class};
+ Class[] ctor = new Class[]{Object.class};
try {
- referenceConstructor=HardReference.class.getConstructor(ctor);
+ referenceConstructor = HardReference.class.getConstructor(ctor);
} catch (NoSuchMethodException e) {
//deep trouble here
- throw new BuildException("when creating a Hard Reference constructor",e);
+ throw new BuildException("when creating a Hard Reference constructor", e);
}
if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
//create a weak ref constructor. If this fails we have that hard one anyway
try {
- Class clazz=Class.forName(WEAK_REFERENCE_NAME);
- referenceConstructor=clazz.getConstructor(ctor);
+ Class clazz = Class.forName(WEAK_REFERENCE_NAME);
+ referenceConstructor = clazz.getConstructor(ctor);
} catch (ClassNotFoundException e) {
+ // ignore
} catch (NoSuchMethodException e) {
+ // ignore
}
}
}
diff --git a/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java b/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java
index 4bf7fbb52..3e8572956 100644
--- a/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java
+++ b/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java
@@ -115,7 +115,7 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer {
*/
public Enumeration getFileDependencies() {
if (!supportsFileDependencies()) {
- throw new RuntimeException("File dependencies are not supported "
+ throw new RuntimeException("File dependencies are not supported "
+ "by this analyzer");
}
if (!determined) {
@@ -142,7 +142,7 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer {
* Get the file that contains the class definition
*
* @param classname the name of the required class
- * @return the file instance, zip or class, containing the
+ * @return the file instance, zip or class, containing the
* class or null if the class could not be found.
* @exception IOException if the files in the classpath cannot be read.
*/
@@ -157,7 +157,7 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer {
* Get the file that contains the class source.
*
* @param classname the name of the required class
- * @return the file instance, zip or java, containing the
+ * @return the file instance, zip or java, containing the
* source or null if the source for the class could not be found.
* @exception IOException if the files in the sourcepath cannot be read.
*/
@@ -244,7 +244,7 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer {
/**
* Get an enumeration of the root classes
*
- * @return an enumeration of Strings, each of which is a class name
+ * @return an enumeration of Strings, each of which is a class name
* for a root class.
*/
protected Enumeration getRootClasses() {
@@ -252,7 +252,7 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer {
}
/**
- * Indicate if the analyzer is required to follow
+ * Indicate if the analyzer is required to follow
* indirect class relationships.
*
* @return true if indirect relationships should be followed.
@@ -284,7 +284,7 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer {
*
* @param resourceLocation the name of the required resource.
* @param paths the paths which will be searched for the resource.
- * @return the file instance, zip or class, containing the
+ * @return the file instance, zip or class, containing the
* class or null if the class could not be found.
* @exception IOException if the files in the given paths cannot be read.
*/
diff --git a/src/main/org/apache/tools/ant/util/depend/DependencyAnalyzer.java b/src/main/org/apache/tools/ant/util/depend/DependencyAnalyzer.java
index 724db4dbc..5a2db7b29 100644
--- a/src/main/org/apache/tools/ant/util/depend/DependencyAnalyzer.java
+++ b/src/main/org/apache/tools/ant/util/depend/DependencyAnalyzer.java
@@ -147,7 +147,7 @@ public interface DependencyAnalyzer {
* Get the file that contains the class definition
*
* @param classname the name of the required class
- * @return the file instance, zip or class, containing the
+ * @return the file instance, zip or class, containing the
* class or null if the class could not be found.
* @exception IOException if the files in the classpath cannot be read.
*/
@@ -157,7 +157,7 @@ public interface DependencyAnalyzer {
* Get the file that contains the class source.
*
* @param classname the name of the required class
- * @return the file instance, zip or java, containing the
+ * @return the file instance, zip or java, containing the
* source or null if the source for the class could not be found.
* @exception IOException if the files in the sourcepath cannot be read.
*/
diff --git a/src/main/org/apache/tools/ant/util/depend/bcel/AncestorAnalyzer.java b/src/main/org/apache/tools/ant/util/depend/bcel/AncestorAnalyzer.java
index 1c25035b9..229b0ba8d 100644
--- a/src/main/org/apache/tools/ant/util/depend/bcel/AncestorAnalyzer.java
+++ b/src/main/org/apache/tools/ant/util/depend/bcel/AncestorAnalyzer.java
@@ -68,7 +68,7 @@ import org.apache.tools.ant.util.depend.AbstractAnalyzer;
* @author Conor MacNeill
*/
public class AncestorAnalyzer extends AbstractAnalyzer {
-
+
public AncestorAnalyzer() {
// force BCEL classes to load now
try {
@@ -77,7 +77,7 @@ public class AncestorAnalyzer extends AbstractAnalyzer {
// ignore
}
}
-
+
/**
* Determine the dependencies of the configured root classes.
*
diff --git a/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java b/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java
index 1ac9f307a..c4fd03c28 100644
--- a/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java
+++ b/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java
@@ -129,7 +129,7 @@ public class DependencyVisitor extends EmptyVisitor {
if (index > 0) {
char start;
// check if the package structure is more than 1 level deep
- int index2 = classname.lastIndexOf(".", index -1);
+ int index2 = classname.lastIndexOf(".", index - 1);
if (index2 != -1) {
// class name has more than 1 package level 'com.company.Class'
start = classname.charAt(index2 + 1);
@@ -141,8 +141,8 @@ public class DependencyVisitor extends EmptyVisitor {
if ((start > 0x40) && (start < 0x5B)) {
// first letter of the previous segment of the class name 'Class'
// is upper case ascii. so according to the spec it's an inner class
- classname = classname.substring(0, index) + "$" +
- classname.substring(index + 1);
+ classname = classname.substring(0, index) + "$"
+ + classname.substring(index + 1);
addClass(classname);
} else {
// Add the class in dotted notation 'com.company.Class'
diff --git a/src/main/org/apache/tools/ant/util/depend/bcel/FullAnalyzer.java b/src/main/org/apache/tools/ant/util/depend/bcel/FullAnalyzer.java
index 2a8b94486..a29636dd2 100644
--- a/src/main/org/apache/tools/ant/util/depend/bcel/FullAnalyzer.java
+++ b/src/main/org/apache/tools/ant/util/depend/bcel/FullAnalyzer.java
@@ -77,7 +77,7 @@ public class FullAnalyzer extends AbstractAnalyzer {
// ignore
}
}
-
+
/**
* Determine the dependencies of the configured root classes.
*
diff --git a/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java b/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java
index 071026b06..963e6d32c 100644
--- a/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java
+++ b/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java
@@ -153,7 +153,7 @@ public class FacadeTaskHelper {
public String[] getArgs() {
Vector tmp = new Vector(args.size());
for (Enumeration enum = args.elements(); enum.hasMoreElements();) {
- ImplementationSpecificArgument arg =
+ ImplementationSpecificArgument arg =
((ImplementationSpecificArgument) enum.nextElement());
String[] curr = arg.getParts(getImplementation());
for (int i = 0; i < curr.length; i++) {
diff --git a/src/main/org/apache/tools/ant/util/regexp/JakartaOroMatcher.java b/src/main/org/apache/tools/ant/util/regexp/JakartaOroMatcher.java
index 7d56c125a..c7c09b5b6 100644
--- a/src/main/org/apache/tools/ant/util/regexp/JakartaOroMatcher.java
+++ b/src/main/org/apache/tools/ant/util/regexp/JakartaOroMatcher.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -64,7 +64,7 @@ import org.apache.tools.ant.BuildException;
/**
* Implementation of RegexpMatcher for Jakarta-ORO.
*
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
* @author Matthew Inger
*/
public class JakartaOroMatcher implements RegexpMatcher {
@@ -73,7 +73,8 @@ public class JakartaOroMatcher implements RegexpMatcher {
protected final Perl5Compiler compiler = new Perl5Compiler();
protected final Perl5Matcher matcher = new Perl5Matcher();
- public JakartaOroMatcher() {}
+ public JakartaOroMatcher() {
+ }
/**
* Set the regexp pattern from the String description.
@@ -166,7 +167,7 @@ public class JakartaOroMatcher implements RegexpMatcher {
if (RegexpUtil.hasFlag(options, MATCH_SINGLELINE)) {
cOptions |= Perl5Compiler.SINGLELINE_MASK;
}
-
+
return cOptions;
}
diff --git a/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java b/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
index c2f423e90..a9ce0a475 100644
--- a/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
+++ b/src/main/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -96,11 +96,11 @@ public class JakartaOroRegexp extends JakartaOroMatcher implements Regexp {
subst.append(c);
}
}
-
+
// Do the substitution
- Substitution s =
- new Perl5Substitution(subst.toString(),
+ Substitution s =
+ new Perl5Substitution(subst.toString(),
Perl5Substitution.INTERPOLATE_ALL);
return Util.substitute(matcher,
getCompiledPattern(options),
diff --git a/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java b/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
index 1a4c52b26..fb597ac93 100644
--- a/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
+++ b/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ import org.apache.tools.ant.BuildException;
/**
* Implementation of RegexpMatcher for Jakarta-Regexp.
*
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
* @author Matthew Inger mattinger@mindless.com
*/
public class JakartaRegexpMatcher implements RegexpMatcher {
diff --git a/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java b/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
index 76e227045..e4b9aef23 100644
--- a/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
+++ b/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,7 +62,7 @@ import org.apache.tools.ant.BuildException;
* Regular expression implementation using the Jakarta Regexp package
* @author Matthew Inger mattinger@mindless.com
*/
-public class JakartaRegexpRegexp extends JakartaRegexpMatcher
+public class JakartaRegexpRegexp extends JakartaRegexpMatcher
implements Regexp {
public JakartaRegexpRegexp() {
@@ -107,5 +107,5 @@ public class JakartaRegexpRegexp extends JakartaRegexpMatcher
RE reg = getCompiledPattern(options);
int sOptions = getSubsOptions(options);
return reg.subst(input, argument, sOptions);
- }
+ }
}
diff --git a/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java b/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
index 7beba7464..4aed0185f 100644
--- a/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
+++ b/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -64,14 +64,15 @@ import org.apache.tools.ant.BuildException;
* Implementation of RegexpMatcher for the built-in regexp matcher of
* JDK 1.4. UNIX_LINES option is enabled as a default.
*
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
* @author Matthew Inger mattinger@mindless.com
*/
public class Jdk14RegexpMatcher implements RegexpMatcher {
private String pattern;
- public Jdk14RegexpMatcher() {}
+ public Jdk14RegexpMatcher() {
+ }
/**
* Set the regexp pattern from the String description.
diff --git a/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java b/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
index c3bca3267..98882ebac 100644
--- a/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
+++ b/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -104,7 +104,7 @@ public class Jdk14RegexpRegexp extends Jdk14RegexpMatcher implements Regexp {
}
}
argument = subst.toString();
-
+
int sOptions = getSubsOptions(options);
Pattern p = getCompiledPattern(options);
StringBuffer sb = new StringBuffer();
@@ -123,5 +123,5 @@ public class Jdk14RegexpRegexp extends Jdk14RegexpMatcher implements Regexp {
}
return sb.toString();
- }
+ }
}
diff --git a/src/main/org/apache/tools/ant/util/regexp/Regexp.java b/src/main/org/apache/tools/ant/util/regexp/Regexp.java
index 52075100d..3a40e6970 100644
--- a/src/main/org/apache/tools/ant/util/regexp/Regexp.java
+++ b/src/main/org/apache/tools/ant/util/regexp/Regexp.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java b/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java
index 262a077b2..dbebd7aca 100644
--- a/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java
+++ b/src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -87,40 +87,46 @@ public class RegexpFactory extends RegexpMatcherFactory {
} else {
systemDefault = p.getProperty("ant.regexp.regexpimpl");
}
-
+
if (systemDefault != null) {
return createRegexpInstance(systemDefault);
- // XXX should we silently catch possible exceptions and try to
+ // XXX should we silently catch possible exceptions and try to
// load a different implementation?
}
try {
testAvailability("java.util.regex.Matcher");
return createRegexpInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp");
- } catch (BuildException be) {}
-
+ } catch (BuildException be) {
+ // ignore
+ }
+
try {
testAvailability("org.apache.oro.text.regex.Pattern");
return createRegexpInstance("org.apache.tools.ant.util.regexp.JakartaOroRegexp");
- } catch (BuildException be) {}
-
+ } catch (BuildException be) {
+ // ignore
+ }
+
try {
testAvailability("org.apache.regexp.RE");
return createRegexpInstance("org.apache.tools.ant.util.regexp.JakartaRegexpRegexp");
- } catch (BuildException be) {}
+ } catch (BuildException be) {
+ // ignore
+ }
throw new BuildException("No supported regular expression matcher found");
}
/**
- * Wrapper over RegexpMatcherFactory.createInstance that ensures that
+ * Wrapper over RegexpMatcherFactory.createInstance that ensures that
* we are dealing with a Regexp implementation.
*
* @since 1.3
- *
+ *
* @see RegexpMatcherFactory#createInstance(String)
*/
- protected Regexp createRegexpInstance(String classname)
+ protected Regexp createRegexpInstance(String classname)
throws BuildException {
RegexpMatcher m = createInstance(classname);
diff --git a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcher.java b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcher.java
index 43ea2d6be..c7a5f6239 100644
--- a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcher.java
+++ b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcher.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,7 @@ import org.apache.tools.ant.BuildException;
/**
* Interface describing a regular expression matcher.
*
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
* @author Matthew Inger
*/
public interface RegexpMatcher {
@@ -75,7 +75,7 @@ public interface RegexpMatcher {
* Perform a case insenstive match
*/
int MATCH_CASE_INSENSITIVE = 0x00000100;
-
+
/***
* Treat the input as a multiline input
*/
diff --git a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
index 0851f1c4c..dca7554c1 100644
--- a/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
+++ b/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,15 +62,16 @@ import org.apache.tools.ant.Project;
* RegexpMatcher based on the system property
* ant.regexp.matcherimpl
and the classes
* available.
- *
+ *
* In a more general framework this class would be abstract and
* have a static newInstance method.
*
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
*/
public class RegexpMatcherFactory {
- public RegexpMatcherFactory() {}
+ public RegexpMatcherFactory() {
+ }
/***
* Create a new regular expression instance.
@@ -92,32 +93,38 @@ public class RegexpMatcherFactory {
} else {
systemDefault = p.getProperty("ant.regexp.regexpimpl");
}
-
+
if (systemDefault != null) {
return createInstance(systemDefault);
- // XXX should we silently catch possible exceptions and try to
+ // XXX should we silently catch possible exceptions and try to
// load a different implementation?
}
try {
testAvailability("java.util.regex.Matcher");
return createInstance("org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher");
- } catch (BuildException be) {}
-
+ } catch (BuildException be) {
+ // ignore
+ }
+
try {
testAvailability("org.apache.oro.text.regex.Pattern");
return createInstance("org.apache.tools.ant.util.regexp.JakartaOroMatcher");
- } catch (BuildException be) {}
-
+ } catch (BuildException be) {
+ // ignore
+ }
+
try {
testAvailability("org.apache.regexp.RE");
return createInstance("org.apache.tools.ant.util.regexp.JakartaRegexpMatcher");
- } catch (BuildException be) {}
+ } catch (BuildException be) {
+ // ignore
+ }
throw new BuildException("No supported regular expression matcher found");
}
- protected RegexpMatcher createInstance(String className)
+ protected RegexpMatcher createInstance(String className)
throws BuildException {
try {
Class implClass = Class.forName(className);
@@ -126,7 +133,7 @@ public class RegexpMatcherFactory {
throw new BuildException(t);
}
}
-
+
protected void testAvailability(String className) throws BuildException {
try {
Class implClass = Class.forName(className);
diff --git a/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java b/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
index 8d9764f14..feb26e8fc 100644
--- a/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
+++ b/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/src/main/org/apache/tools/mail/MailMessage.java b/src/main/org/apache/tools/mail/MailMessage.java
index 8561039f2..74845cd53 100644
--- a/src/main/org/apache/tools/mail/MailMessage.java
+++ b/src/main/org/apache/tools/mail/MailMessage.java
@@ -168,7 +168,7 @@ public class MailMessage {
* @exception IOException if there's any problem contacting the mail server
*/
public MailMessage() throws IOException {
- this("localhost",DEFAULT_PORT);
+ this("localhost", DEFAULT_PORT);
}
/**
@@ -179,7 +179,7 @@ public class MailMessage {
* @exception IOException if there's any problem contacting the mail server
*/
public MailMessage(String host) throws IOException {
- this(host,DEFAULT_PORT);
+ this(host, DEFAULT_PORT);
}
/**
@@ -190,7 +190,7 @@ public class MailMessage {
* @param port the port to connect to
* @exception IOException if there's any problem contacting the mail server
*/
- public MailMessage(String host, int port) throws IOException{
+ public MailMessage(String host, int port) throws IOException {
this.port = port;
this.host = host;
replyto = new Vector();
@@ -400,7 +400,7 @@ public class MailMessage {
void getReady() throws IOException {
String response = in.getResponse();
- int[] ok = { 220 };
+ int[] ok = {220};
if (!isResponseOK(response, ok)) {
throw new IOException(
"Didn't get introduction from server: " + response);
@@ -409,32 +409,32 @@ public class MailMessage {
void sendHelo() throws IOException {
String local = InetAddress.getLocalHost().getHostName();
- int[] ok = { 250 };
+ int[] ok = {250};
send("HELO " + local, ok);
}
void sendFrom(String from) throws IOException {
- int[] ok = { 250 };
+ int[] ok = {250};
send("MAIL FROM: " + "<" + sanitizeAddress(from) + ">", ok);
}
void sendRcpt(String rcpt) throws IOException {
- int[] ok = { 250, 251 };
+ int[] ok = {250, 251};
send("RCPT TO: " + "<" + sanitizeAddress(rcpt) + ">", ok);
}
void sendData() throws IOException {
- int[] ok = { 354 };
+ int[] ok = {354};
send("DATA", ok);
}
void sendDot() throws IOException {
- int[] ok = { 250 };
+ int[] ok = {250};
send("\r\n.", ok); // make sure dot is on new line
}
void sendQuit() throws IOException {
- int[] ok = { 221 };
+ int[] ok = {221};
try {
send("QUIT", ok);
} catch (IOException e) {
diff --git a/src/main/org/apache/tools/mail/SmtpResponseReader.java b/src/main/org/apache/tools/mail/SmtpResponseReader.java
index f018e583d..d6cd56819 100644
--- a/src/main/org/apache/tools/mail/SmtpResponseReader.java
+++ b/src/main/org/apache/tools/mail/SmtpResponseReader.java
@@ -66,7 +66,7 @@ import java.io.InputStreamReader;
* The same rules used here would apply to FTP and other Telnet
* based protocols as well.
*
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
*/
public class SmtpResponseReader {
@@ -77,7 +77,7 @@ public class SmtpResponseReader {
* Wrap this input stream.
*/
public SmtpResponseReader(InputStream in) {
- reader = new BufferedReader(new InputStreamReader(in));
+ reader = new BufferedReader(new InputStreamReader(in));
}
/**
@@ -94,7 +94,7 @@ public class SmtpResponseReader {
result.append(line.substring(0, 3));
result.append(" ");
}
-
+
while (line != null) {
append(line);
if (!hasMoreLines(line)) {
diff --git a/src/main/org/apache/tools/zip/AsiExtraField.java b/src/main/org/apache/tools/zip/AsiExtraField.java
index 82837be60..8231b1564 100644
--- a/src/main/org/apache/tools/zip/AsiExtraField.java
+++ b/src/main/org/apache/tools/zip/AsiExtraField.java
@@ -179,7 +179,7 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
System.arraycopy((new ZipLong(linkArray.length)).getBytes(),
0, data, 2, 4);
- System.arraycopy((new ZipShort(getUserId())).getBytes(),
+ System.arraycopy((new ZipShort(getUserId())).getBytes(),
0, data, 6, 2);
System.arraycopy((new ZipShort(getGroupId())).getBytes(),
0, data, 8, 2);
@@ -327,12 +327,12 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
crc.update(tmp);
long realChecksum = crc.getValue();
if (givenChecksum != realChecksum) {
- throw new ZipException("bad CRC checksum "
+ throw new ZipException("bad CRC checksum "
+ Long.toHexString(givenChecksum)
- + " instead of "
+ + " instead of "
+ Long.toHexString(realChecksum));
}
-
+
int newMode = (new ZipShort(tmp, 0)).getValue();
byte[] linkArray = new byte[(int) (new ZipLong(tmp, 2)).getValue()];
uid = (new ZipShort(tmp, 6)).getValue();
@@ -362,5 +362,5 @@ public class AsiExtraField implements ZipExtraField, UnixStat, Cloneable {
}
return type | (mode & PERM_MASK);
}
-
+
}
diff --git a/src/main/org/apache/tools/zip/ExtraFieldUtils.java b/src/main/org/apache/tools/zip/ExtraFieldUtils.java
index 08061ef25..c94439167 100644
--- a/src/main/org/apache/tools/zip/ExtraFieldUtils.java
+++ b/src/main/org/apache/tools/zip/ExtraFieldUtils.java
@@ -91,13 +91,11 @@ public class ExtraFieldUtils {
ZipExtraField ze = (ZipExtraField) c.newInstance();
implementations.put(ze.getHeaderId(), c);
} catch (ClassCastException cc) {
- throw new RuntimeException(c +
- " doesn\'t implement ZipExtraField");
+ throw new RuntimeException(c + " doesn\'t implement ZipExtraField");
} catch (InstantiationException ie) {
throw new RuntimeException(c + " is not a concrete class");
} catch (IllegalAccessException ie) {
- throw new RuntimeException(c +
- "\'s no-arg constructor is not public");
+ throw new RuntimeException(c + "\'s no-arg constructor is not public");
}
}
@@ -149,7 +147,7 @@ public class ExtraFieldUtils {
throw new ZipException("data starting at " + start
+ " is in unknown format");
}
-
+
ZipExtraField[] result = new ZipExtraField[v.size()];
v.copyInto(result);
return result;
diff --git a/src/main/org/apache/tools/zip/UnixStat.java b/src/main/org/apache/tools/zip/UnixStat.java
index ba5832124..a4f9dccd5 100644
--- a/src/main/org/apache/tools/zip/UnixStat.java
+++ b/src/main/org/apache/tools/zip/UnixStat.java
@@ -86,9 +86,9 @@ public interface UnixStat {
* @since 1.1
*/
int DIR_FLAG = 040000;
-
+
// ----------------------------------------------------------
- // somewhat arbitrary choices that are quite common for shared
+ // somewhat arbitrary choices that are quite common for shared
// installations
// -----------------------------------------------------------