git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274953 13f79535-47bb-0310-9956-ffa450edef68master
@@ -101,7 +101,7 @@ import org.apache.tools.ant.util.FileUtils; | |||
* @author Peter Reilly | |||
*/ | |||
public class Concat extends Task { | |||
// The size of buffers to be used | |||
private static final int BUFFER_SIZE = 8192; | |||
@@ -1,7 +1,7 @@ | |||
/* | |||
* The Apache Software License, Version 1.1 | |||
* | |||
* Copyright (c) 2001-2002 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 | |||
@@ -83,7 +83,7 @@ public class ConditionTask extends ConditionBase { | |||
/** | |||
* The name of the property to set. Required. | |||
* | |||
* @param p the name of the property | |||
* @since Ant 1.4 | |||
*/ | |||
public void setProperty(String p) { | |||
@@ -93,7 +93,7 @@ public class ConditionTask extends ConditionBase { | |||
/** | |||
* The value for the property to set, if condition evaluates to true. | |||
* Defaults to "true". | |||
* | |||
* @param v the value of the property | |||
* @since Ant 1.4 | |||
*/ | |||
public void setValue(String v) { | |||
@@ -104,6 +104,7 @@ public class ConditionTask extends ConditionBase { | |||
* See whether our nested condition holds and set the property. | |||
* | |||
* @since Ant 1.4 | |||
* @exception BuildException if an error occurs | |||
*/ | |||
public void execute() throws BuildException { | |||
if (countConditions() > 1) { | |||
@@ -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-2003 The Apache Software Foundation. All rights | |||
* reserved. | |||
* | |||
* Redistribution and use in source and binary forms, with or without | |||
@@ -81,10 +81,20 @@ public class Copydir extends MatchingTask { | |||
private boolean forceOverwrite = false; | |||
private Hashtable filecopyList = new Hashtable(); | |||
/** | |||
* The src attribute | |||
* | |||
* @param src the source file | |||
*/ | |||
public void setSrc(File src) { | |||
srcDir = src; | |||
} | |||
/** | |||
* The dest attribute | |||
* | |||
* @param dest the destination file | |||
*/ | |||
public void setDest(File dest) { | |||
destDir = dest; | |||
} | |||
@@ -83,12 +83,12 @@ public class DefaultExcludes extends Task { | |||
* @exception BuildException if someting goes wrong with the build | |||
*/ | |||
public void execute() throws BuildException { | |||
if (defaultrequested == false && add.equals("") && remove.equals("") && (echo == false)) { | |||
if (!defaultrequested && add.equals("") && remove.equals("") && !echo) { | |||
throw new BuildException("<defaultexcludes> task must set " | |||
+ "at least one attribute (echo=\"false\"" | |||
+ " doesn't count since that is the default"); | |||
} | |||
if (defaultrequested == true) { | |||
if (defaultrequested) { | |||
DirectoryScanner.resetDefaultExcludes(); | |||
} | |||
if (!add.equals("")) { | |||
@@ -97,7 +97,7 @@ public class DefaultExcludes extends Task { | |||
if (!remove.equals("")) { | |||
DirectoryScanner.removeDefaultExclude(remove); | |||
} | |||
if (echo == true) { | |||
if (echo) { | |||
StringBuffer message | |||
= new StringBuffer("Current Default Excludes:\n"); | |||
String[] excludes = DirectoryScanner.getDefaultExcludes(); | |||
@@ -54,9 +54,7 @@ | |||
package org.apache.tools.ant.taskdefs; | |||
import java.io.BufferedInputStream; | |||
import java.io.File; | |||
import java.io.FileInputStream; | |||
import java.io.IOException; | |||
import java.util.Hashtable; | |||
import javax.xml.parsers.DocumentBuilderFactory; | |||
@@ -296,8 +294,9 @@ public class XmlProperty extends org.apache.tools.ant.Task { | |||
} catch (SAXException sxe) { | |||
// Error generated during parsing | |||
Exception x = sxe; | |||
if (sxe.getException() != null) | |||
if (sxe.getException() != null) { | |||
x = sxe.getException(); | |||
} | |||
throw new BuildException(x); | |||
} catch (ParserConfigurationException pce) { | |||
@@ -572,6 +571,7 @@ public class XmlProperty extends org.apache.tools.ant.Task { | |||
/** | |||
* The XML file to parse; required. | |||
* @param src the file to parse | |||
*/ | |||
public void setFile(File src) { | |||
this.src = src; | |||
@@ -579,6 +579,7 @@ public class XmlProperty extends org.apache.tools.ant.Task { | |||
/** | |||
* the prefix to prepend to each property | |||
* @param prefix the prefix to prepend to each property | |||
*/ | |||
public void setPrefix(String prefix) { | |||
this.prefix = prefix.trim(); | |||
@@ -588,6 +589,7 @@ public class XmlProperty extends org.apache.tools.ant.Task { | |||
* flag to include the xml root tag as a | |||
* first value in the property name; optional, | |||
* default is true | |||
* @param keepRoot if true (default), include the xml root tag | |||
*/ | |||
public void setKeeproot(boolean keepRoot) { | |||
this.keepRoot = keepRoot; | |||
@@ -595,6 +597,7 @@ public class XmlProperty extends org.apache.tools.ant.Task { | |||
/** | |||
* flag to validate the XML file; optional, default false | |||
* @param validate if true validate the XML file, default false | |||
*/ | |||
public void setValidate(boolean validate) { | |||
this.validate = validate; | |||
@@ -603,6 +606,7 @@ public class XmlProperty extends org.apache.tools.ant.Task { | |||
/** | |||
* flag to treat attributes as nested elements; | |||
* optional, default false | |||
* @param collapseAttributes if true treat attributes as nested elements | |||
*/ | |||
public void setCollapseAttributes(boolean collapseAttributes) { | |||
this.collapseAttributes = collapseAttributes; | |||