From 410129735b97c3b972e414d89f0798272642e2de Mon Sep 17 00:00:00 2001
From: Conor MacNeill
* The sequential task has no attributes and does not support any nested
diff --git a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
index a7b4166ee..32e075bce 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
@@ -227,7 +227,7 @@ public class Tstamp extends Task {
* @param id
* @see java.util.TimeZone
*/
- public void setTimezone(String id){
+ public void setTimezone(String id) {
timeZone = TimeZone.getTimeZone(id);
}
@@ -308,7 +308,7 @@ public class Tstamp extends Task {
calendar.add(field, offset);
date = calendar.getTime();
}
- if (timeZone != null){
+ if (timeZone != null) {
sdf.setTimeZone(timeZone);
}
Tstamp.this.setProperty(propertyName, sdf.format(date));
diff --git a/src/main/org/apache/tools/ant/taskdefs/WhichResource.java b/src/main/org/apache/tools/ant/taskdefs/WhichResource.java
index a973ac27e..bd05e1b39 100644
--- a/src/main/org/apache/tools/ant/taskdefs/WhichResource.java
+++ b/src/main/org/apache/tools/ant/taskdefs/WhichResource.java
@@ -121,15 +121,15 @@ public class WhichResource extends Task {
*/
private void validate() {
int setcount=0;
- if(classname != null) {
+ if (classname != null) {
setcount++;
}
- if(resource!=null) {
+ if (resource!=null) {
setcount++;
}
- if(setcount == 0) {
+ if (setcount == 0) {
throw new BuildException(
"One of classname or resource must be specified");
}
@@ -137,7 +137,7 @@ public class WhichResource extends Task {
throw new BuildException(
"Only one of classname or resource can be specified");
}
- if(property==null) {
+ if (property==null) {
throw new BuildException("No property defined");
}
}
@@ -162,19 +162,19 @@ public class WhichResource extends Task {
getProject(),
classpath, false);
String location=null;
- if(classname!=null) {
+ if (classname!=null) {
//convert a class name into a resource
classname= classname.replace('.', '/');
resource="/"+ classname +".class";
} else {
- if(!resource.startsWith("/")) {
+ if (!resource.startsWith("/")) {
resource="/"+resource;
}
}
log("Searching for "+resource,Project.MSG_VERBOSE);
URL url;
url=loader.getResource(resource);
- if(url!=null) {
+ if (url!=null) {
//set the property
location = url.toExternalForm();
getProject().setNewProperty(property,location);
diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
index 546d05994..cb75288f2 100644
--- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
+++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
@@ -266,7 +266,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
if (performDirectoryScan) {
// Process all the directories marked for styling
dirs = scanner.getIncludedDirectories();
- for (int j = 0; j < dirs.length; ++j){
+ for (int j = 0; j < dirs.length; ++j) {
list = new File(baseDir, dirs[j]).list();
for (int i = 0; i < list.length; ++i) {
process(baseDir, list[i], destDir, stylesheet);
@@ -432,7 +432,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
*
* @param outFile the output File instance.
*/
- public void setOut(File outFile){
+ public void setOut(File outFile) {
this.outFile = outFile;
}
@@ -442,7 +442,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
*
* @param inFile the input file
*/
- public void setIn(File inFile){
+ public void setIn(File inFile) {
this.inFile = inFile;
}
@@ -618,7 +618,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
*
* @param name the name of the parameter.
*/
- public void setName(String name){
+ public void setName(String name) {
this.name = name;
}
@@ -628,7 +628,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
* @param expression the XSL expression representing the
* parameter's value.
*/
- public void setExpression(String expression){
+ public void setExpression(String expression) {
this.expression = expression;
}
@@ -759,7 +759,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
* like the exact copy of JAXP interface..
* @param liaison the TRaXLiaison to configure.
*/
- protected void configureTraXLiaison(TraXLiaison liaison){
+ protected void configureTraXLiaison(TraXLiaison liaison) {
if (factory != null) {
liaison.setFactory(factory.getName());
@@ -887,7 +887,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
// a value must be of a given type
// say boolean|integer|string that are mostly used.
if ("true".equalsIgnoreCase(value)
- || "false".equalsIgnoreCase(value) ){
+ || "false".equalsIgnoreCase(value) ) {
this.value = new Boolean(value);
} else {
try {
diff --git a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
index 9fa70e454..e32b3c7e3 100644
--- a/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
+++ b/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogParser.java
@@ -262,11 +262,11 @@ class ChangeLogParser {
return null;
}
}
-
+
/**
* reset all internal attributes except status.
*/
- private void reset(){
+ private void reset() {
m_file = null;
m_date = null;
m_author = null;
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 1233016bc..38588e7da 100644
--- a/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/email/EmailTask.java
@@ -103,8 +103,7 @@ public class EmailTask
* @return a list of valid entries
*/
public String[] getValues() {
- return new String[]
- {AUTO, MIME, UU, PLAIN};
+ return new String[] {AUTO, MIME, UU, PLAIN};
}
}
@@ -605,7 +604,7 @@ public class EmailTask
throw e;
}
}
- catch(Exception e){
+ catch (Exception e) {
log("Failed to send email", Project.MSG_WARN);
if (failOnError) {
throw new BuildException(e);
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java
index 8dcd25b87..063514a44 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java
@@ -273,7 +273,7 @@ public class EchoProperties extends Task {
Properties props = new Properties();
props.load(in);
CollectionUtils.putAll(allProps, props);
- } catch(FileNotFoundException fnfe) {
+ } catch (FileNotFoundException fnfe) {
String message =
"Could not find file " + inFile.getAbsolutePath();
if (failonerror) {
@@ -282,7 +282,7 @@ public class EchoProperties extends Task {
log(message, Project.MSG_WARN);
}
return;
- } catch(IOException ioe) {
+ } catch (IOException ioe) {
String message =
"Could not read file " + inFile.getAbsolutePath();
if (failonerror) {
@@ -293,10 +293,10 @@ public class EchoProperties extends Task {
return;
} finally {
try {
- if(null != in) {
+ if (null != in) {
in.close();
}
- } catch(IOException ioe) {}
+ } catch (IOException ioe) {}
}
}
@@ -389,7 +389,7 @@ public class EchoProperties extends Task {
// output properties
String name;
Enumeration e = props.propertyNames();
- while(e.hasMoreElements()) {
+ while (e.hasMoreElements()) {
name = (String)e.nextElement();
Element propElement = doc.createElement(PROPERTY);
propElement.setAttribute(ATTR_NAME, name);
@@ -403,10 +403,10 @@ public class EchoProperties extends Task {
wri.write("");
(new DOMElementWriter()).write(rootElement, wri, 0, "\t");
wri.flush();
- } catch(IOException ioe) {
+ } catch (IOException ioe) {
throw new BuildException("Unable to write XML file", ioe);
} finally {
- if(wri != null) {
+ if (wri != null) {
wri.close();
}
}
@@ -476,7 +476,7 @@ public class EchoProperties extends Task {
private static DocumentBuilder getDocumentBuilder() {
try {
return DocumentBuilderFactory.newInstance().newDocumentBuilder();
- } catch(Exception e) {
+ } catch (Exception e) {
throw new ExceptionInInitializerError(e);
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java b/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
index 769adbe06..9e8deb9f5 100755
--- a/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
@@ -344,7 +344,7 @@ public class Javah extends Task {
try {
// first search for the "old" javah class in 1.4.2 tools.jar
javahMainClass = Class.forName("com.sun.tools.javah.oldjavah.Main");
- } catch(ClassNotFoundException cnfe) {
+ } catch (ClassNotFoundException cnfe) {
// assume older than 1.4.2 tools.jar
javahMainClass = Class.forName("com.sun.tools.javah.Main");
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
index ed1c1fa1b..f6417fb6f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
@@ -371,8 +371,7 @@ public class ReplaceRegExp extends Task {
// first CR in this line
hasCR = true;
}
- }
- else if (c == '\n') {
+ } else if (c == '\n') {
// LF -> EOL
line = linebuf.toString();
res = doReplace(regex, subs, line, options);
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 609668469..2dfd784ba 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
@@ -74,7 +74,7 @@ public class CCMCheck extends Continuus {
private File file = null;
private String comment = null;
private String task = null;
-
+
protected Vector filesets = new Vector();
public CCMCheck() {
@@ -158,16 +158,16 @@ public class CCMCheck extends Continuus {
if (file != null && file.exists() && file.isDirectory()) {
throw new BuildException("CCMCheck cannot be generated for directories");
}
-
+
if (file != null && filesets.size() > 0) {
throw new BuildException("Choose between file and fileset !");
}
- if ( getFile() !=null ) {
+ if ( getFile() !=null) {
doit();
return ;
}
-
+
int sizeofFileSet = filesets.size();
for (int i = 0; i < sizeofFileSet; i++) {
FileSet fs = (FileSet) filesets.elementAt(i);
@@ -180,12 +180,11 @@ public class CCMCheck extends Continuus {
}
}
}
-
+
/**
* check the file given by getFile().
*/
- private void doit()
- {
+ private void doit() {
Commandline commandLine = new Commandline();
// build the command line from what we got the format is
@@ -194,9 +193,9 @@ public class CCMCheck extends Continuus {
commandLine.setExecutable(getCcmCommand());
commandLine.createArgument().setValue(getCcmAction());
-
+
checkOptions(commandLine);
-
+
int result = run(commandLine);
if (result != 0) {
String msg = "Failed executing: " + commandLine.toString();
@@ -217,11 +216,11 @@ public class CCMCheck extends Continuus {
if (getTask() != null) {
cmd.createArgument().setValue(FLAG_TASK);
cmd.createArgument().setValue(getTask());
- }
+ }
if (getFile() != null) {
cmd.createArgument().setValue(file.getAbsolutePath());
- }
+ }
}
/**
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 f0a48b043..a966ff73c 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
@@ -150,7 +150,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 3c6ac53e3..3747622af 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
@@ -152,7 +152,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 843c2afc8..77c905400 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
@@ -150,7 +150,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/dotnet/CSharp.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
index 2c50b6578..ead22e41f 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
@@ -392,7 +392,7 @@ public class CSharp extends DotnetCompile {
protected String getDefinitionsParameter() {
String predecessors=super.getDefinitionsParameter();
if (notEmpty(definitions)) {
- if(predecessors==null) {
+ if (predecessors==null) {
predecessors= "/define:";
}
return predecessors+ definitions;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetBaseMatchingTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetBaseMatchingTask.java
index e8d320960..376b486fe 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetBaseMatchingTask.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetBaseMatchingTask.java
@@ -134,7 +134,7 @@ public class DotnetBaseMatchingTask extends MatchingTask {
protected int buildFileList(NetCommand command, Hashtable filesToBuild, long outputTimestamp) {
int filesOutOfDate=0;
boolean scanImplicitFileset=getSrcDir()!=null || filesets.size()==0;
- if(scanImplicitFileset) {
+ if (scanImplicitFileset) {
//scan for an implicit fileset if there was a srcdir set
//or there was no srcDir set but the @
if (getSrcDir() == null) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
index ee4001830..b5e647498 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
@@ -168,8 +168,7 @@ public abstract class DotnetCompile
* need to reference mscorlib.dll, cos it is always there
*/
- protected static final String[] DEFAULT_REFERENCE_LIST_DOTNET_10 =
- {"Accessibility.dll",
+ protected static final String[] DEFAULT_REFERENCE_LIST_DOTNET_10 = {"Accessibility.dll",
"cscompmgd.dll",
"CustomMarshalers.dll",
"Mscorcfg.dll",
@@ -712,13 +711,13 @@ public abstract class DotnetCompile
while (defEnum.hasMoreElements()) {
//loop through all definitions
DotnetDefine define = (DotnetDefine) defEnum.nextElement();
- if(define.isSet(this)) {
+ if (define.isSet(this)) {
//add those that are set, and a delimiter
defines.append(define.getValue(this));
defines.append(getDefinitionsDelimiter());
}
}
- if(defines.length()==0) {
+ if (defines.length()==0) {
return null;
} else {
return "/D:"+defines;
@@ -937,7 +936,7 @@ public abstract class DotnetCompile
outputTimestamp);
}
//bail out early if there were no files
- if(filesToBuild.size()==0) {
+ if (filesToBuild.size()==0) {
return 0;
}
StringBuffer referenceList= new StringBuffer(REFERENCE_OPTION);
@@ -945,7 +944,7 @@ public abstract class DotnetCompile
Enumeration files = filesToBuild.elements();
while (files.hasMoreElements()) {
File file = (File) files.nextElement();
- if(isFileManagedBinary(file)) {
+ if (isFileManagedBinary(file)) {
referenceList.append(file.toString());
referenceList.append(getReferenceDelimiter());
} else {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetDefine.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetDefine.java
index e1764134a..0e2aa6c27 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetDefine.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetDefine.java
@@ -106,11 +106,11 @@ public class DotnetDefine {
* @throws BuildException
*/
public String getValue(Task owner) throws BuildException {
- if(name==null) {
+ if (name==null) {
throw new BuildException("No name provided for the define element",
owner.getLocation());
}
- if(!isSet(owner)) {
+ if (!isSet(owner)) {
return null;
}
return name;
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/ImportTypelib.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/ImportTypelib.java
index 83faedd3e..36846e947 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/ImportTypelib.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/ImportTypelib.java
@@ -170,7 +170,7 @@ public class ImportTypelib extends Task {
throw new BuildException(
"source file is a directory");
}
- if(namespace==null) {
+ if (namespace==null) {
throw new BuildException("No namespace");
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/VisualBasicCompile.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/VisualBasicCompile.java
index d14b9ae09..2a0190993 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/VisualBasicCompile.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/VisualBasicCompile.java
@@ -364,7 +364,7 @@ public class VisualBasicCompile extends DotnetCompile {
protected void validate()
throws BuildException {
super.validate();
- if(getDestFile()==null) {
+ if (getDestFile()==null) {
throw new BuildException("DestFile was not specified");
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java
index 3418c828e..4b9f83c68 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WsdlToDotnet.java
@@ -239,7 +239,7 @@ public class WsdlToDotnet extends Task {
//set source and rebuild options
boolean rebuild = true;
- if(srcFile!=null) {
+ if (srcFile!=null) {
command.addArgument(srcFile.toString());
//rebuild unless the dest file is newer than the source file
if (srcFile.exists() && destFile.exists() &&
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 ec620ec02..1c7d9a7c5 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
@@ -106,8 +106,7 @@ import org.apache.tools.ant.types.Path;
* @author Benoit Moussaud
*
*/
-public class BorlandDeploymentTool extends GenericDeploymentTool implements ExecuteStreamHandler
-{
+public class BorlandDeploymentTool extends GenericDeploymentTool implements ExecuteStreamHandler {
public static final String PUBLICID_BORLAND_EJB
= "-//Inprise Corporation//DTD Enterprise JavaBeans 1.1//EN";
@@ -295,7 +294,7 @@ public class BorlandDeploymentTool extends GenericDeploymentTool implements Exe
verifyBorlandJarV4(sourceJar);
return ;
}
- if ( version == BES ) {
+ if ( version == BES) {
verifyBorlandJarV5(sourceJar);
return;
}
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 42e538126..89979e114 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
@@ -246,7 +246,7 @@ public class BorlandGenerateClient extends Task {
if ( version == BorlandDeploymentTool.BAS) {
executeForkV4();
}
- if ( version == BorlandDeploymentTool.BES ) {
+ if ( version == BorlandDeploymentTool.BES) {
executeForkV5();
}
}
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 e54b6afca..c1208ff7c 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
@@ -505,7 +505,7 @@ public class EjbJar extends MatchingTask {
* Initially, only the JBoss implementation does something specific for CMP 2.0. This class handles the common description attribute and provides
* a default implementation for reference handling and checking for
@@ -70,7 +70,7 @@ import org.apache.tools.ant.ProjectComponent;
* nested inside elements of the same type (i.e. <patternset>
* but not <path>). Subclasses may need to check whether any other attributes
* have been set as well or child elements have been created and
* thus override this method. if they do the must call
- *
* @since ant 1.6
*/
- public void setCmpversion( CMPVersion version ) {
+ public void setCmpversion( CMPVersion version) {
this.cmpVersion = version.getValue();
}
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 d91b3759c..cd654d903 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,7 +97,7 @@ 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);
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 b854b240a..92dfa3261 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
@@ -69,50 +69,42 @@ import org.apache.tools.ant.taskdefs.optional.extension.ExtensionResolver;
* @version $Revision$ $Date$
*/
public class AntResolver
- implements ExtensionResolver
-{
+ implements ExtensionResolver {
private File m_antfile;
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 )
- throws BuildException
- {
+ throws BuildException {
validate();
final Ant ant = (Ant)project.createTask( "ant" );
ant.setInheritAll( false );
ant.setAntfile( m_antfile.getName() );
- try
- {
+ try {
final File dir =
m_antfile.getParentFile().getCanonicalFile();
ant.setDir( dir );
}
- catch( final IOException ioe )
- {
+ catch ( final IOException ioe) {
throw new BuildException( ioe.getMessage(), ioe );
}
- if( null != m_target )
- {
+ if (null != m_target) {
ant.setTarget( m_target );
}
@@ -121,23 +113,19 @@ public class AntResolver
return m_destfile;
}
- private void validate()
- {
- if( null == m_antfile )
- {
+ private void validate() {
+ if (null == m_antfile) {
final String message = "Must specify Buildfile";
throw new BuildException( message );
}
- if( null == m_destfile )
- {
+ if (null == m_destfile) {
final String message = "Must specify destination file";
throw new BuildException( message );
}
}
- public String toString()
- {
+ public String toString() {
return "Ant[" + m_antfile + "==>" + m_destfile + "]";
}
}
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 f340b228b..5f1c38758 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
@@ -67,21 +67,17 @@ import org.apache.tools.ant.taskdefs.optional.extension.ExtensionResolver;
* @version $Revision$ $Date$
*/
public class LocationResolver
- implements ExtensionResolver
-{
+ 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 )
- throws BuildException
- {
- if( null == m_location )
- {
+ throws BuildException {
+ if (null == m_location) {
final String message = "No location specified for resolver";
throw new BuildException( message );
}
@@ -89,8 +85,7 @@ public class LocationResolver
return project.resolveFile( m_location );
}
- public String toString()
- {
+ public String toString() {
return "Location[" + m_location + "]";
}
}
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 132f90f0e..88a461a72 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
@@ -69,31 +69,26 @@ import org.apache.tools.ant.taskdefs.optional.extension.ExtensionResolver;
* @version $Revision$ $Date$
*/
public class URLResolver
- implements ExtensionResolver
-{
+ implements ExtensionResolver {
private File m_destfile;
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 )
- throws BuildException
- {
+ throws BuildException {
validate();
final File file = getDest();
@@ -106,25 +101,17 @@ public class URLResolver
return file;
}
- private File getDest()
- {
- if( null != m_destfile )
- {
+ private File getDest() {
+ if (null != m_destfile) {
return m_destfile;
- }
- else
- {
+ } else {
final String file = m_url.getFile();
String filename = null;
- if( null == file || file.length() <= 1 )
- {
+ if (null == file || file.length() <= 1) {
filename = "default.file";
- }
- else
- {
+ } else {
int index = file.lastIndexOf( '/' );
- if( -1 == index )
- {
+ if (-1 == index) {
index = 0;
}
filename = file.substring( index );
@@ -134,28 +121,22 @@ public class URLResolver
}
}
- private void validate()
- {
- if( null == m_url )
- {
+ private void validate() {
+ if (null == m_url) {
final String message = "Must specify URL";
throw new BuildException( message );
}
- if( null == m_destdir && null == m_destfile )
- {
+ if (null == m_destdir && null == m_destfile) {
final String message = "Must specify destination file or directory";
throw new BuildException( message );
- }
- else if( null != m_destdir && null != m_destfile )
- {
+ } else if (null != m_destdir && null != m_destfile) {
final String message = "Must not specify both destination file or directory";
throw new BuildException( message );
}
}
- public String toString()
- {
+ public String toString() {
return "URL[" + m_url + "]";
}
}
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 f4463f381..819dbebeb 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
@@ -548,8 +548,7 @@ public class Translate extends MatchingTask {
// If there is a white space or = or :, then
// it isn't to be treated as a valid key.
boolean validToken = true;
- for (int k = 0; k < token.length() && validToken; k++)
- {
+ for (int k = 0; k < token.length() && validToken; k++) {
char c = token.charAt(k);
if (c == ':' || c == '='
|| Character.isSpaceChar(c)) {
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java
index dfd53e3c1..d50a851cd 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJWorkspaceScanner.java
@@ -88,8 +88,7 @@ import org.apache.tools.ant.DirectoryScanner;
class VAJWorkspaceScanner extends DirectoryScanner {
// Patterns that should be excluded by default.
- private static final String[] DEFAULTEXCLUDES =
- {
+ private static final String[] DEFAULTEXCLUDES = {
"IBM*/**",
"Java class libraries/**",
"Sun class libraries*/**",
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java
index c59315e1e..212b89334 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/JonasHotDeploymentTool.java
@@ -89,8 +89,7 @@ public class JonasHotDeploymentTool extends GenericHotDeploymentTool implements
/**
* All the valid actions that weblogic.deploy permits *
*/
- private static final String[] VALID_ACTIONS =
- {ACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE};
+ private static final String[] VALID_ACTIONS = {ACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE};
/**
* Description of the Field
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
index 773614c13..144419e72 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
@@ -72,14 +72,12 @@ import org.apache.tools.ant.taskdefs.Java;
* @see org.apache.tools.ant.taskdefs.optional.j2ee.AbstractHotDeploymentTool
* @see org.apache.tools.ant.taskdefs.optional.j2ee.ServerDeploy
*/
-public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool implements HotDeploymentTool
-{
+public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool implements HotDeploymentTool {
/** The classname of the tool to run **/
private static final String WEBLOGIC_DEPLOY_CLASS_NAME = "weblogic.deploy";
/** All the valid actions that weblogic.deploy permits **/
- private static final String[] VALID_ACTIONS =
- {ACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE};
+ private static final String[] VALID_ACTIONS = {ACTION_DELETE, ACTION_DEPLOY, ACTION_LIST, ACTION_UNDEPLOY, ACTION_UPDATE};
/** Represents the "-debug" flag from weblogic.deploy **/
private boolean debug;
@@ -126,21 +124,21 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool impleme
throw new BuildException("The password attribute must be set.");
// check for missing application on deploy & update
- if ((action.equals(ACTION_DEPLOY) || action.equals(ACTION_UPDATE))
+ if ((action.equals(ACTION_DEPLOY) || action.equals(ACTION_UPDATE))
&& application == null)
- throw new BuildException("The application attribute must be set "
+ throw new BuildException("The application attribute must be set "
+ "if action = " + action);
// check for missing source on deploy & update
- if ((action.equals(ACTION_DEPLOY) || action.equals(ACTION_UPDATE))
+ if ((action.equals(ACTION_DEPLOY) || action.equals(ACTION_UPDATE))
&& getTask().getSource() == null)
- throw new BuildException("The source attribute must be set if "
+ throw new BuildException("The source attribute must be set if "
+ "action = " + action);
// check for missing application on delete & undeploy
- if ((action.equals(ACTION_DELETE) || action.equals(ACTION_UNDEPLOY))
+ if ((action.equals(ACTION_DELETE) || action.equals(ACTION_UNDEPLOY))
&& application == null)
- throw new BuildException("The application attribute must be set if "
+ throw new BuildException("The application attribute must be set if "
+ "action = " + action);
}
@@ -221,7 +219,7 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool impleme
if (component != null) {
args = "-component " + component + " " + args;
}
-
+
return args;
}
@@ -268,7 +266,7 @@ public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool impleme
* It is in the form <component>:<target1>,<target2>...
* Where component is the archive name (minus the .jar, .ear, .war
* extension). Targets are the servers where the components will be deployed
-
+
* @param component A String representing the value of the "-component"
* argument of the weblogic.deploy command line argument.
*/
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 0cb5e6ef5..bcd9cde69 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
@@ -421,7 +421,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;
}
@@ -537,7 +537,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/junit/FormatterElement.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/FormatterElement.java
index 72af3c2a8..4514b84aa 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
@@ -182,8 +182,7 @@ public class FormatterElement {
* used if the property has been set, otherwise it won't.
* @param ifProperty name of property
*/
- public void setIf(String ifProperty)
- {
+ public void setIf(String ifProperty) {
this.ifProperty = ifProperty;
}
@@ -193,8 +192,7 @@ public class FormatterElement {
* will be used.
* @param unlessProperty name of property
*/
- public void setUnless(String unlessProperty)
- {
+ public void setUnless(String unlessProperty) {
this.unlessProperty = unlessProperty;
}
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 286bbfc07..fa8d6734a 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
@@ -664,7 +664,7 @@ public class JUnitTask extends Task {
final FormatterElement[] feArray = mergeFormatters(test);
for (int i = 0; i < feArray.length; i++) {
FormatterElement fe = feArray[i];
- if(fe.shouldUse(this)) {
+ if (fe.shouldUse(this)) {
formatterArg.append("formatter=");
formatterArg.append(fe.getClassname());
File outFile = getOutput(fe, test);
@@ -881,7 +881,7 @@ public class JUnitTask extends Task {
final FormatterElement[] feArray = mergeFormatters(test);
for (int i = 0; i < feArray.length; i++) {
FormatterElement fe = feArray[i];
- if(fe.shouldUse(this)) {
+ if (fe.shouldUse(this)) {
File outFile = getOutput(fe, test);
if (outFile != null) {
fe.setOutfile(outFile);
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 b6f1cdc33..d26808aba 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
@@ -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 7176dfdb1..0bda5365a 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,8 +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());
}
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 a5dac665e..da6f2c06a 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
@@ -250,7 +250,7 @@ public class Symlink extends Task {
// fill up a Properties object with link and resource
// names
- while(eachlink.hasMoreElements()) {
+ while (eachlink.hasMoreElements()) {
File alink = (File) eachlink.nextElement();
try {
linksToStore.put(alink.getName(),
@@ -269,8 +269,7 @@ public class Symlink extends Task {
writePropertyFile(linksToStore, writeTo,
"Symlinks from " + writeTo.getParent());
}
- }
- else {
+ } else {
handleError("Invalid action specified in symlink");
}
} finally {
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 5f23c5477..0007e5ab4 100644
--- a/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
+++ b/src/main/org/apache/tools/ant/taskdefs/rmic/SunRmic.java
@@ -77,19 +77,18 @@ public class SunRmic extends DefaultRmicAdapter {
// Create an instance of the rmic, redirecting output to
// the project log
- LogOutputStream logstr = new LogOutputStream(getRmic(),
+ LogOutputStream logstr = new LogOutputStream(getRmic(),
Project.MSG_WARN);
try {
Class c = Class.forName("sun.rmi.rmic.Main");
- Constructor cons = c.getConstructor(new Class[]
- { OutputStream.class, String.class });
+ Constructor cons = c.getConstructor(new Class[] { OutputStream.class, String.class });
Object rmic = cons.newInstance(new Object[] { logstr, "rmic" });
- Method doRmic = c.getMethod("compile",
+ Method doRmic = c.getMethod("compile",
new Class [] { String[].class });
- Boolean ok =
- (Boolean) doRmic.invoke(rmic,
+ Boolean ok =
+ (Boolean) doRmic.invoke(rmic,
(new Object[] {cmd.getArguments()}));
return ok.booleanValue();
} catch (ClassNotFoundException ex) {
@@ -102,7 +101,7 @@ public class SunRmic extends DefaultRmicAdapter {
if (ex instanceof BuildException) {
throw (BuildException) ex;
} else {
- throw new BuildException("Error starting SUN rmic: ",
+ throw new BuildException("Error starting SUN rmic: ",
ex, getRmic().getLocation());
}
} finally {
diff --git a/src/main/org/apache/tools/ant/types/Assertions.java b/src/main/org/apache/tools/ant/types/Assertions.java
index 3aff1478b..d6550a560 100644
--- a/src/main/org/apache/tools/ant/types/Assertions.java
+++ b/src/main/org/apache/tools/ant/types/Assertions.java
@@ -150,7 +150,7 @@ public class Assertions extends DataType {
* super.setRefid
.super.setRefid
.super.setRefid
.
This implementation is appropriate only for a DataType that - * cannot hold other DataTypes as children.
+ * cannot hold other DataTypes as children. * *The general contract of this method is that it shouldn't do
* anything if {@link #checked checked
} is true and
- * set it to true on exit.
See {@link org.apache.tools.ant.taskdefs.FixCRLF FixCRLF} for an
* example.
*
- * @author Stefan Bodewig
+ * @author Stefan Bodewig
*/
public abstract class EnumeratedAttribute {
@@ -87,7 +87,7 @@ public abstract class EnumeratedAttribute {
public abstract String[] getValues();
/** bean constructor */
- protected EnumeratedAttribute(){
+ protected EnumeratedAttribute() {
}
/**
@@ -116,13 +116,13 @@ public abstract class EnumeratedAttribute {
* or -1 if it cannot be found.
* @see #getValues()
*/
- public final int indexOfValue(String value){
+ public final int indexOfValue(String value) {
String[] values = getValues();
if (values == null || value == null) {
return -1;
}
- for (int i = 0; i < values.length; i++){
- if (value.equals(values[i])){
+ for (int i = 0; i < values.length; i++) {
+ if (value.equals(values[i])) {
return i;
}
}
@@ -149,7 +149,7 @@ public abstract class EnumeratedAttribute {
* Convert the value to its string form.
*
* @return the string form of the value.
- */
+ */
public String toString() {
return getValue();
}
diff --git a/src/main/org/apache/tools/ant/types/FilterChain.java b/src/main/org/apache/tools/ant/types/FilterChain.java
index d483055bf..7bf613cda 100644
--- a/src/main/org/apache/tools/ant/types/FilterChain.java
+++ b/src/main/org/apache/tools/ant/types/FilterChain.java
@@ -79,8 +79,7 @@ import org.apache.tools.ant.filters.TokenFilter;
* @author Magesh Umasankar
*/
public final class FilterChain extends DataType
- implements Cloneable
-{
+ implements Cloneable {
private Vector filterReaders = new Vector();
@@ -170,8 +169,7 @@ public final class FilterChain extends DataType
* containsregex
* @since Ant 1.6
*/
- public void addContainsRegex(TokenFilter.ContainsRegex filter)
- {
+ public void addContainsRegex(TokenFilter.ContainsRegex filter) {
filterReaders.addElement(filter);
}
@@ -179,8 +177,7 @@ public final class FilterChain extends DataType
* replaceregex
* @since Ant 1.6
*/
- public void addReplaceRegex(TokenFilter.ReplaceRegex filter)
- {
+ public void addReplaceRegex(TokenFilter.ReplaceRegex filter) {
filterReaders.addElement(filter);
}
@@ -188,8 +185,7 @@ public final class FilterChain extends DataType
* trim
* @since Ant 1.6
*/
- public void addTrim(TokenFilter.Trim filter)
- {
+ public void addTrim(TokenFilter.Trim filter) {
filterReaders.addElement(filter);
}
@@ -198,8 +194,7 @@ public final class FilterChain extends DataType
* @since Ant 1.6
*/
public void addReplaceString(
- TokenFilter.ReplaceString filter)
- {
+ TokenFilter.ReplaceString filter) {
filterReaders.addElement(filter);
}
@@ -208,8 +203,7 @@ public final class FilterChain extends DataType
* @since Ant 1.6
*/
public void addIgnoreBlank(
- TokenFilter.IgnoreBlank filter)
- {
+ TokenFilter.IgnoreBlank filter) {
filterReaders.addElement(filter);
}
diff --git a/src/main/org/apache/tools/ant/types/Mapper.java b/src/main/org/apache/tools/ant/types/Mapper.java
index ac4b1c2b6..95a48da2f 100644
--- a/src/main/org/apache/tools/ant/types/Mapper.java
+++ b/src/main/org/apache/tools/ant/types/Mapper.java
@@ -204,7 +204,7 @@ public class Mapper extends DataType implements Cloneable {
FileNameMapper m = (FileNameMapper) c.newInstance();
final Project project = getProject();
- if ( project != null ) {
+ if ( project != null) {
project.setProjectReference( m );
}
m.setFrom(from);
diff --git a/src/main/org/apache/tools/ant/types/Path.java b/src/main/org/apache/tools/ant/types/Path.java
index 6be1c76cf..62ef52083 100644
--- a/src/main/org/apache/tools/ant/types/Path.java
+++ b/src/main/org/apache/tools/ant/types/Path.java
@@ -654,8 +654,7 @@ 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 4a809722a..2c5927134 100644
--- a/src/main/org/apache/tools/ant/types/PropertySet.java
+++ b/src/main/org/apache/tools/ant/types/PropertySet.java
@@ -206,8 +206,7 @@ public class PropertySet extends DataType {
if (!getDynamic()) {
cachedNames = names;
}
- }
- else {
+ } else {
names = cachedNames;
}
@@ -247,16 +246,14 @@ public class PropertySet extends DataType {
if (prj.getProperty(ref.name) != null) {
names.addElement(ref.name);
}
- }
- else if (ref.prefix != null) {
+ } else if (ref.prefix != null) {
for (Enumeration p = properties.keys(); p.hasMoreElements();) {
String name = (String) p.nextElement();
if (name.startsWith(ref.prefix)) {
names.addElement(name);
}
}
- }
- else if (ref.regex != null) {
+ } else if (ref.regex != null) {
RegexpMatcherFactory matchMaker = new RegexpMatcherFactory();
RegexpMatcher matcher = matchMaker.newRegexpMatcher();
matcher.setPattern(ref.regex);
diff --git a/src/main/org/apache/tools/ant/types/XMLCatalog.java b/src/main/org/apache/tools/ant/types/XMLCatalog.java
index 3d667366d..34c383ddb 100644
--- a/src/main/org/apache/tools/ant/types/XMLCatalog.java
+++ b/src/main/org/apache/tools/ant/types/XMLCatalog.java
@@ -927,23 +927,19 @@ public class XMLCatalog extends DataType
try {
setXMLCatalog =
resolverImplClass.getMethod("setXMLCatalog",
- new Class[]
- {XMLCatalog.class});
+ new Class[] {XMLCatalog.class});
parseCatalog =
resolverImplClass.getMethod("parseCatalog",
- new Class[]
- {String.class});
+ new Class[] {String.class});
resolveEntity =
resolverImplClass.getMethod("resolveEntity",
- new Class[]
- {String.class, String.class});
+ new Class[] {String.class, String.class});
resolve =
resolverImplClass.getMethod("resolve",
- new Class[]
- {String.class, String.class});
+ new Class[] {String.class, String.class});
} catch (NoSuchMethodException ex) {
throw new BuildException(ex);
}
@@ -977,8 +973,7 @@ public class XMLCatalog extends DataType
try {
result =
(InputSource) resolveEntity.invoke(resolverImpl,
- new Object[]
- {publicId, systemId});
+ new Object[] {publicId, systemId});
} catch (Exception ex) {
throw new BuildException(ex);
}
@@ -995,8 +990,7 @@ public class XMLCatalog extends DataType
try {
result =
(InputSource) resolveEntity.invoke(resolverImpl,
- new Object[]
- {publicId, systemId});
+ new Object[] {publicId, systemId});
} catch (Exception ex) {
throw new BuildException(ex);
}
@@ -1059,8 +1053,7 @@ public class XMLCatalog extends DataType
try {
result =
(SAXSource) resolve.invoke(resolverImpl,
- new Object[]
- {href, base});
+ new Object[] {href, base});
} catch (Exception ex) {
throw new BuildException(ex);
}
@@ -1077,8 +1070,7 @@ public class XMLCatalog extends DataType
try {
result =
(SAXSource) resolve.invoke(resolverImpl,
- new Object[]
- {href, base});
+ new Object[] {href, base});
} catch (Exception ex) {
throw new BuildException(ex);
}
@@ -1099,8 +1091,7 @@ public class XMLCatalog extends DataType
try {
setXMLCatalog.invoke(resolverImpl,
- new Object[]
- {XMLCatalog.this});
+ new Object[] {XMLCatalog.this});
} catch (Exception ex) {
throw new BuildException(ex);
}
@@ -1117,8 +1108,7 @@ public class XMLCatalog extends DataType
log("Parsing " + catFile, Project.MSG_DEBUG);
try {
parseCatalog.invoke(resolverImpl,
- new Object[]
- {catFile.getPath()});
+ new Object[] {catFile.getPath()});
} catch (Exception ex) {
throw new BuildException(ex);
}
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 ee4e181f9..29634ee13 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
@@ -62,58 +62,46 @@ import java.awt.image.BufferedImage;
* @author Kevin Z Grey
* @see org.apache.tools.ant.tasks.optional.image.Image
*/
-public class Draw extends TransformOperation
-{
+public class Draw extends TransformOperation {
protected int xloc = 0;
protected int yloc = 0;
- public void setXloc(int x)
- {
+ public void setXloc(int x) {
xloc = x;
}
- public void setYloc(int y)
- {
+ public void setYloc(int y) {
yloc = y;
}
- public void addRectangle(Rectangle rect)
- {
+ public void addRectangle(Rectangle rect) {
instructions.add(rect);
}
- public void addText(Text text)
- {
+ public void addText(Text text) {
instructions.add(text);
}
- public void addEllipse(Ellipse elip)
- {
+ public void addEllipse(Ellipse elip) {
instructions.add(elip);
}
- public void addArc(Arc arc)
- {
+ public void addArc(Arc arc) {
instructions.add(arc);
}
- public PlanarImage executeTransformOperation(PlanarImage image)
- {
+ public PlanarImage executeTransformOperation(PlanarImage image) {
BufferedImage bi = image.getAsBufferedImage();
Graphics2D graphics = (Graphics2D)bi.getGraphics();
- for (int i=0; i This method overrides the superclass method of the same name
* in order to add catalog entries back to the controlling
@@ -131,26 +131,24 @@ public class ApacheCatalog extends Catalog {
if (resolver == null) {
catalogManager.debug
.message(1, "Internal Error: null ApacheCatalogResolver");
- }
- else {
+ } else {
resolver.addPublicEntry(publicid, systemid, base);
}
} else if (type == URI) {
-
+
String uri = normalizeURI(entry.getEntryArg(0));
String altURI = normalizeURI(entry.getEntryArg(1));
if (resolver == null) {
catalogManager.debug
.message(1, "Internal Error: null ApacheCatalogResolver");
- }
- else {
+ } else {
resolver.addURIEntry(uri, altURI, base);
}
}
-
+
super.addEntry(entry);
}
diff --git a/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java b/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java
index 3fba2e175..f27931418 100644
--- a/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java
+++ b/src/main/org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java
@@ -75,7 +75,7 @@ import org.apache.xml.resolver.tools.CatalogResolver;
* class. XMLCatalog calls methods in this class using Reflection in
* order to avoid requiring the xml-commons resolver library in the
* path. The {@link org.apache.tools.ant.types.resolver.ApacheCatalog
* ApacheCatalog} class is used to parse external catalog files, which
* can be in either or
* XML format. For each entry found in an external catalog file, if any, an
* instance of {@link org.apache.tools.ant.types.ResourceLocation
* ResourceLocation} is created and added to the controlling
@@ -102,9 +102,8 @@ public class ApacheCatalogResolver extends CatalogResolver {
/** The XMLCatalog object to callback. */
private XMLCatalog xmlCatalog = null;
-
- static
- {
+
+ static {
//
// If you don't do this, you get all sorts of annoying
// warnings about a missing properties file. However, it
@@ -133,7 +132,7 @@ public class ApacheCatalogResolver extends CatalogResolver {
this.xmlCatalog = xmlCatalog;
}
- /**
+ /**
* XMLCatalog calls this to add an external catalog file for each
* file within a
* In code-language it means that it is not necessary to do:
* <catalogfiles>
fileset.
*/
@@ -147,10 +146,10 @@ public class ApacheCatalogResolver extends CatalogResolver {
try {
catalog.parseCatalog(file);
}
- catch(MalformedURLException ex) {
+ catch (MalformedURLException ex) {
throw new BuildException(ex);
}
- catch(IOException ex) {
+ catch (IOException ex) {
throw new BuildException(ex);
}
}
@@ -166,9 +165,9 @@ public class ApacheCatalogResolver extends CatalogResolver {
* specifies a relative URL/pathname, it is resolved using the
* base. The default base for an external catalog file is the
* directory in which the catalog is located.
- *
+ *
*/
- public void addPublicEntry(String publicid,
+ public void addPublicEntry(String publicid,
String systemid,
URL base) {
@@ -176,7 +175,7 @@ public class ApacheCatalogResolver extends CatalogResolver {
dtd.setBase(base);
dtd.setPublicId(publicid);
dtd.setLocation(systemid);
-
+
xmlCatalog.addDTD(dtd);
}
@@ -192,9 +191,9 @@ public class ApacheCatalogResolver extends CatalogResolver {
* specifies a relative URL/pathname, it is resolved using the
* base. The default base for an external catalog file is the
* directory in which the catalog is located.
- *
+ *
*/
- public void addURIEntry(String uri,
+ public void addURIEntry(String uri,
String altURI,
URL base) {
@@ -202,7 +201,7 @@ public class ApacheCatalogResolver extends CatalogResolver {
entity.setBase(base);
entity.setPublicId(uri);
entity.setLocation(altURI);
-
+
xmlCatalog.addEntity(entity);
}
diff --git a/src/main/org/apache/tools/ant/util/ClasspathUtils.java b/src/main/org/apache/tools/ant/util/ClasspathUtils.java
index 3473969f1..23d6dabea 100644
--- a/src/main/org/apache/tools/ant/util/ClasspathUtils.java
+++ b/src/main/org/apache/tools/ant/util/ClasspathUtils.java
@@ -73,7 +73,7 @@ import org.apache.tools.ant.types.Reference;
*
* ClasspathUtils.Delegate cpDelegate;
*
- * public void init(){
+ * public void init() {
* this.cpDelegate = ClasspathUtils.getDelegate(this);
* super.init();
* }
diff --git a/src/main/org/apache/tools/ant/util/CollectionUtils.java b/src/main/org/apache/tools/ant/util/CollectionUtils.java
index 56ffadb23..f793a621a 100644
--- a/src/main/org/apache/tools/ant/util/CollectionUtils.java
+++ b/src/main/org/apache/tools/ant/util/CollectionUtils.java
@@ -77,7 +77,7 @@ public class CollectionUtils {
if (v1 == v2) {
return true;
}
-
+
if (v1 == null || v2 == null) {
return false;
}
@@ -93,7 +93,7 @@ public class CollectionUtils {
return false;
}
}
-
+
// don't need to check e2.hasMoreElements as the Vectors have
// same size.
@@ -111,7 +111,7 @@ public class CollectionUtils {
if (d1 == d2) {
return true;
}
-
+
if (d1 == null || d2 == null) {
return false;
}
@@ -129,7 +129,7 @@ public class CollectionUtils {
return false;
}
}
-
+
// don't need the opposite check as the Dictionaries have the
// same size, so we've also covered all keys of d2 already.
@@ -142,7 +142,7 @@ public class CollectionUtils {
* @since Ant 1.6
*/
public static void putAll(Dictionary m1, Dictionary m2) {
- for(Enumeration it = m2.keys(); it.hasMoreElements();) {
+ for (Enumeration it = m2.keys(); it.hasMoreElements();) {
Object key = it.nextElement();
m1.put(key, m2.get(key));
}
diff --git a/src/main/org/apache/tools/ant/util/DateUtils.java b/src/main/org/apache/tools/ant/util/DateUtils.java
index 6c5ec2cf9..a00caeee1 100644
--- a/src/main/org/apache/tools/ant/util/DateUtils.java
+++ b/src/main/org/apache/tools/ant/util/DateUtils.java
@@ -71,7 +71,7 @@ import java.util.TimeZone;
* @author Stefan Bodewig
*
* @since Ant 1.5
- *
+ *
* @version $Revision$
*/
public final class DateUtils {
@@ -108,11 +108,9 @@ public final class DateUtils {
private static final double[] LIMITS = {0, 1, 2};
- private static final String[] MINUTES_PART =
- {"", "1 minute ", "{0,number} minutes "};
+ private static final String[] MINUTES_PART = {"", "1 minute ", "{0,number} minutes "};
- private static final String[] SECONDS_PART =
- {"0 seconds", "1 second", "{1,number} seconds"};
+ private static final String[] SECONDS_PART = {"0 seconds", "1 second", "{1,number} seconds"};
private static final ChoiceFormat MINUTES_FORMAT =
new ChoiceFormat(LIMITS, MINUTES_PART);
@@ -236,7 +234,7 @@ public final class DateUtils {
public static String getDateForHeader() {
Calendar cal = Calendar.getInstance();
TimeZone tz = cal.getTimeZone();
- int offset = tz.getOffset(cal.get(Calendar.ERA),
+ int offset = tz.getOffset(cal.get(Calendar.ERA),
cal.get(Calendar.YEAR),
cal.get(Calendar.MONTH),
cal.get(Calendar.DAY_OF_MONTH),
diff --git a/src/main/org/apache/tools/ant/util/JAXPUtils.java b/src/main/org/apache/tools/ant/util/JAXPUtils.java
index 4de5864a6..cae60cbf6 100644
--- a/src/main/org/apache/tools/ant/util/JAXPUtils.java
+++ b/src/main/org/apache/tools/ant/util/JAXPUtils.java
@@ -205,7 +205,7 @@ public class JAXPUtils {
* @return the systemid corresponding to the given file.
* @since Ant 1.5.2
*/
- public static String getSystemId(File file){
+ public static String getSystemId(File file) {
return fu.toURI(file.getAbsolutePath());
}
diff --git a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
index 3617061a0..738a64adc 100644
--- a/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
+++ b/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
@@ -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/KeepAliveOutputStream.java b/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java
index f67bce9c7..eb7aceb1e 100644
--- a/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java
+++ b/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java
@@ -64,7 +64,7 @@ import java.io.OutputStream;
*
- * if (out != System.out && out!= System.err){
+ * if (out != System.out && out!= System.err) {
* out.close();
* }
*
diff --git a/src/main/org/apache/tools/ant/util/LazyHashtable.java b/src/main/org/apache/tools/ant/util/LazyHashtable.java
index 278f911a0..ca37a2653 100644
--- a/src/main/org/apache/tools/ant/util/LazyHashtable.java
+++ b/src/main/org/apache/tools/ant/util/LazyHashtable.java
@@ -75,8 +75,8 @@ public class LazyHashtable extends Hashtable {
* we delay it until we do need _all_ tasks. Otherwise we
* just get the tasks that we need, and avoid costly init.
*/
- protected void initAll( ) {
- if( initAllDone ) return;
+ protected void initAll() {
+ if (initAllDone ) return;
initAllDone=true;
}
@@ -96,7 +96,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 +109,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/StringUtils.java b/src/main/org/apache/tools/ant/util/StringUtils.java
index 51194ee9c..7dd9670ea 100644
--- a/src/main/org/apache/tools/ant/util/StringUtils.java
+++ b/src/main/org/apache/tools/ant/util/StringUtils.java
@@ -73,7 +73,7 @@ public final class StringUtils {
* @param data the string to split up into lines.
* @return the list of lines available in the string.
*/
- public static Vector lineSplit(String data){
+ public static Vector lineSplit(String data) {
return split(data, '\n');
}
@@ -84,11 +84,11 @@ public final class StringUtils {
* @param ch the separator character.
* @return the list of elements.
*/
- public static Vector split(String data, int ch){
+ public static Vector split(String data, int ch) {
Vector elems = new Vector();
int pos = -1;
int i = 0;
- while ((pos = data.indexOf(ch, i)) != -1){
+ while ((pos = data.indexOf(ch, i)) != -1) {
String elem = data.substring(i, pos);
elems.addElement(elem);
i = pos + 1;
@@ -104,11 +104,11 @@ public final class StringUtils {
* @param to the occurrence to be used as a replacement.
* @return the new string with replaced occurrences.
*/
- public static String replace(String data, String from, String to){
+ public static String replace(String data, String from, String to) {
StringBuffer buf = new StringBuffer(data.length());
int pos = -1;
int i = 0;
- while ((pos = data.indexOf(from, i)) != -1){
+ while ((pos = data.indexOf(from, i)) != -1) {
buf.append(data.substring(i, pos)).append(to);
i = pos + from.length();
}
diff --git a/src/main/org/apache/tools/ant/util/TaskLogger.java b/src/main/org/apache/tools/ant/util/TaskLogger.java
index a5a04b3b7..55ea41303 100644
--- a/src/main/org/apache/tools/ant/util/TaskLogger.java
+++ b/src/main/org/apache/tools/ant/util/TaskLogger.java
@@ -62,40 +62,33 @@ import org.apache.tools.ant.Task;
* @author Peter Donald
* @version $Revision$ $Date$
*/
-public final class TaskLogger
-{
+public final class TaskLogger {
/**
* Task to use to do logging.
*/
private Task m_task;
- public TaskLogger( final Task task )
- {
+ public TaskLogger( final Task task) {
this.m_task = task;
}
- public void info( final String message )
- {
+ public void info( final String message) {
m_task.log( message, Project.MSG_INFO );
}
- public void error( final String message )
- {
+ public void error( final String message) {
m_task.log( message, Project.MSG_ERR );
}
- public void warning( final String message )
- {
+ public void warning( final String message) {
m_task.log( message, Project.MSG_WARN );
}
- public void verbose( final String message )
- {
+ public void verbose( final String message) {
m_task.log( message, Project.MSG_VERBOSE );
}
- public void debug( final String message )
- {
+ public void debug( final String message) {
m_task.log( message, Project.MSG_DEBUG );
}
}
diff --git a/src/main/org/apache/tools/ant/util/WeakishReference.java b/src/main/org/apache/tools/ant/util/WeakishReference.java
index 0bea36158..63a14684d 100644
--- a/src/main/org/apache/tools/ant/util/WeakishReference.java
+++ b/src/main/org/apache/tools/ant/util/WeakishReference.java
@@ -76,7 +76,7 @@ public abstract class WeakishReference {
* @return reference to the Object.
*/
public static WeakishReference createReference(Object object) {
- if(referenceConstructor==null) {
+ if (referenceConstructor==null) {
createReferenceConstructor();
}
try {
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 e1d107965..1ac9f307a 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
@@ -125,7 +125,7 @@ public class DependencyVisitor extends EmptyVisitor {
&& name.startsWith("class$")) {
String classname = name.substring(6).replace('$', '.');
// does the class have a package structure
- int index = classname.lastIndexOf(".");
+ int index = classname.lastIndexOf(".");
if (index > 0) {
char start;
// check if the package structure is more than 1 level deep
@@ -133,8 +133,7 @@ public class DependencyVisitor extends EmptyVisitor {
if (index2 != -1) {
// class name has more than 1 package level 'com.company.Class'
start = classname.charAt(index2 + 1);
- }
- else {
+ } else {
// class name has only 1 package level 'package.Class'
start = classname.charAt(0);
}
@@ -143,15 +142,13 @@ public class DependencyVisitor extends EmptyVisitor {
// 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.substring(index + 1);
addClass(classname);
- }
- else {
- // Add the class in dotted notation 'com.company.Class'
+ } else {
+ // Add the class in dotted notation 'com.company.Class'
addClass(classname);
- }
- }
- else {
+ }
+ } else {
// Add a class with no package 'Class'
addClass(classname);
}
diff --git a/src/main/org/apache/tools/mail/MailMessage.java b/src/main/org/apache/tools/mail/MailMessage.java
index c112c6791..8561039f2 100644
--- a/src/main/org/apache/tools/mail/MailMessage.java
+++ b/src/main/org/apache/tools/mail/MailMessage.java
@@ -207,7 +207,7 @@ public class MailMessage {
* @param port the port to use for connection.
* @see #DEFAULT_PORT
*/
- public void setPort(int port){
+ public void setPort(int port) {
this.port = port;
}