@@ -38,6 +38,7 @@ import java.util.Stack; | |||||
import org.apache.tools.ant.launch.Launcher; | import org.apache.tools.ant.launch.Launcher; | ||||
import org.apache.tools.ant.taskdefs.Definer; | import org.apache.tools.ant.taskdefs.Definer; | ||||
import org.apache.tools.ant.taskdefs.Property; | |||||
import org.apache.tools.ant.taskdefs.Typedef; | import org.apache.tools.ant.taskdefs.Typedef; | ||||
import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
@@ -523,7 +524,7 @@ public class ComponentHelper { | |||||
if (task == null && taskType.equals(ANT_PROPERTY_TASK)) { | if (task == null && taskType.equals(ANT_PROPERTY_TASK)) { | ||||
// quick fix for Ant.java use of property before | // quick fix for Ant.java use of property before | ||||
// initializing the project | // initializing the project | ||||
addTaskDefinition(ANT_PROPERTY_TASK, org.apache.tools.ant.taskdefs.Property.class); | |||||
addTaskDefinition(ANT_PROPERTY_TASK, Property.class); | |||||
task = createNewTask(taskType); | task = createNewTask(taskType); | ||||
} | } | ||||
return task; | return task; | ||||
@@ -457,6 +457,7 @@ public final class Diagnostics { | |||||
/** | /** | ||||
* Call org.apache.env.Which if available | * Call org.apache.env.Which if available | ||||
* | |||||
* @param out the stream to print the content to. | * @param out the stream to print the content to. | ||||
*/ | */ | ||||
private static void doReportWhich(PrintStream out) { | private static void doReportWhich(PrintStream out) { | ||||
@@ -17,6 +17,7 @@ | |||||
*/ | */ | ||||
package org.apache.tools.ant; | package org.apache.tools.ant; | ||||
import java.io.File; | |||||
import java.lang.reflect.Constructor; | import java.lang.reflect.Constructor; | ||||
import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.InvocationTargetException; | ||||
import java.lang.reflect.Method; | import java.lang.reflect.Method; | ||||
@@ -187,30 +188,30 @@ public final class IntrospectionHelper { | |||||
final Class<?>[] args = m.getParameterTypes(); | final Class<?>[] args = m.getParameterTypes(); | ||||
// check of add[Configured](Class) pattern | // check of add[Configured](Class) pattern | ||||
if (args.length == 1 && java.lang.Void.TYPE.equals(returnType) | |||||
if (args.length == 1 && Void.TYPE.equals(returnType) | |||||
&& ("add".equals(name) || "addConfigured".equals(name))) { | && ("add".equals(name) || "addConfigured".equals(name))) { | ||||
insertAddTypeMethod(m); | insertAddTypeMethod(m); | ||||
continue; | continue; | ||||
} | } | ||||
// not really user settable properties on tasks/project components | // not really user settable properties on tasks/project components | ||||
if (org.apache.tools.ant.ProjectComponent.class.isAssignableFrom(bean) | |||||
if (ProjectComponent.class.isAssignableFrom(bean) | |||||
&& args.length == 1 && isHiddenSetMethod(name, args[0])) { | && args.length == 1 && isHiddenSetMethod(name, args[0])) { | ||||
continue; | continue; | ||||
} | } | ||||
// hide addTask for TaskContainers | // hide addTask for TaskContainers | ||||
if (isContainer() && args.length == 1 && "addTask".equals(name) | if (isContainer() && args.length == 1 && "addTask".equals(name) | ||||
&& org.apache.tools.ant.Task.class.equals(args[0])) { | |||||
&& Task.class.equals(args[0])) { | |||||
continue; | continue; | ||||
} | } | ||||
if ("addText".equals(name) && java.lang.Void.TYPE.equals(returnType) | |||||
&& args.length == 1 && java.lang.String.class.equals(args[0])) { | |||||
if ("addText".equals(name) && Void.TYPE.equals(returnType) | |||||
&& args.length == 1 && String.class.equals(args[0])) { | |||||
addTextMethod = methods[i]; | addTextMethod = methods[i]; | ||||
} else if (name.startsWith("set") && java.lang.Void.TYPE.equals(returnType) | |||||
} else if (name.startsWith("set") && Void.TYPE.equals(returnType) | |||||
&& args.length == 1 && !args[0].isArray()) { | && args.length == 1 && !args[0].isArray()) { | ||||
final String propName = getPropertyName(name, "set"); | final String propName = getPropertyName(name, "set"); | ||||
AttributeSetter as = attributeSetters.get(propName); | AttributeSetter as = attributeSetters.get(propName); | ||||
if (as != null) { | if (as != null) { | ||||
if (java.lang.String.class.equals(args[0])) { | |||||
if (String.class.equals(args[0])) { | |||||
/* | /* | ||||
Ignore method m, as there is an overloaded | Ignore method m, as there is an overloaded | ||||
form of this method that takes in a | form of this method that takes in a | ||||
@@ -219,7 +220,7 @@ public final class IntrospectionHelper { | |||||
*/ | */ | ||||
continue; | continue; | ||||
} | } | ||||
if (java.io.File.class.equals(args[0])) { | |||||
if (File.class.equals(args[0])) { | |||||
// Ant Resources/FileProviders override java.io.File | // Ant Resources/FileProviders override java.io.File | ||||
if (Resource.class.equals(as.type) || FileProvider.class.equals(as.type)) { | if (Resource.class.equals(as.type) || FileProvider.class.equals(as.type)) { | ||||
continue; | continue; | ||||
@@ -251,8 +252,8 @@ public final class IntrospectionHelper { | |||||
nestedCreators.put(propName, new CreateNestedCreator(m)); | nestedCreators.put(propName, new CreateNestedCreator(m)); | ||||
} | } | ||||
} else if (name.startsWith("addConfigured") | } else if (name.startsWith("addConfigured") | ||||
&& java.lang.Void.TYPE.equals(returnType) && args.length == 1 | |||||
&& !java.lang.String.class.equals(args[0]) | |||||
&& Void.TYPE.equals(returnType) && args.length == 1 | |||||
&& !String.class.equals(args[0]) | |||||
&& !args[0].isArray() && !args[0].isPrimitive()) { | && !args[0].isArray() && !args[0].isPrimitive()) { | ||||
try { | try { | ||||
Constructor<?> constructor = null; | Constructor<?> constructor = null; | ||||
@@ -269,8 +270,8 @@ public final class IntrospectionHelper { | |||||
// ignore | // ignore | ||||
} | } | ||||
} else if (name.startsWith("add") | } else if (name.startsWith("add") | ||||
&& java.lang.Void.TYPE.equals(returnType) && args.length == 1 | |||||
&& !java.lang.String.class.equals(args[0]) | |||||
&& Void.TYPE.equals(returnType) && args.length == 1 | |||||
&& !String.class.equals(args[0]) | |||||
&& !args[0].isArray() && !args[0].isPrimitive()) { | && !args[0].isArray() && !args[0].isPrimitive()) { | ||||
try { | try { | ||||
Constructor<?> constructor = null; | Constructor<?> constructor = null; | ||||
@@ -308,10 +309,10 @@ public final class IntrospectionHelper { | |||||
* @return true if the given set method is to be hidden. | * @return true if the given set method is to be hidden. | ||||
*/ | */ | ||||
private boolean isHiddenSetMethod(final String name, final Class<?> type) { | private boolean isHiddenSetMethod(final String name, final Class<?> type) { | ||||
if ("setLocation".equals(name) && org.apache.tools.ant.Location.class.equals(type)) { | |||||
if ("setLocation".equals(name) && Location.class.equals(type)) { | |||||
return true; | return true; | ||||
} | } | ||||
if ("setTaskType".equals(name) && java.lang.String.class.equals(type)) { | |||||
if ("setTaskType".equals(name) && String.class.equals(type)) { | |||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
@@ -1060,7 +1061,7 @@ public final class IntrospectionHelper { | |||||
}; | }; | ||||
} | } | ||||
// simplest case - setAttribute expects String | // simplest case - setAttribute expects String | ||||
if (java.lang.String.class.equals(reflectedArg)) { | |||||
if (String.class.equals(reflectedArg)) { | |||||
return new AttributeSetter(m, arg) { | return new AttributeSetter(m, arg) { | ||||
@Override | @Override | ||||
public void set(final Project p, final Object parent, final String value) | public void set(final Project p, final Object parent, final String value) | ||||
@@ -1685,7 +1686,7 @@ public final class IntrospectionHelper { | |||||
if (exposedClass == null) { | if (exposedClass == null) { | ||||
continue; | continue; | ||||
} | } | ||||
final Method method = findMatchingMethod(exposedClass, methods); | |||||
final Method method = findMatchingMethod(exposedClass, methods); | |||||
if (method == null) { | if (method == null) { | ||||
continue; | continue; | ||||
} | } | ||||
@@ -38,6 +38,7 @@ import java.util.WeakHashMap; | |||||
import org.apache.tools.ant.helper.DefaultExecutor; | import org.apache.tools.ant.helper.DefaultExecutor; | ||||
import org.apache.tools.ant.input.DefaultInputHandler; | import org.apache.tools.ant.input.DefaultInputHandler; | ||||
import org.apache.tools.ant.input.InputHandler; | import org.apache.tools.ant.input.InputHandler; | ||||
import org.apache.tools.ant.launch.Locator; | |||||
import org.apache.tools.ant.types.Description; | import org.apache.tools.ant.types.Description; | ||||
import org.apache.tools.ant.types.FilterSet; | import org.apache.tools.ant.types.FilterSet; | ||||
import org.apache.tools.ant.types.FilterSetCollection; | import org.apache.tools.ant.types.FilterSetCollection; | ||||
@@ -326,7 +327,7 @@ public class Project implements ResourceFactory { | |||||
* to the result | * to the result | ||||
*/ | */ | ||||
private void setAntLib() { | private void setAntLib() { | ||||
final File antlib = org.apache.tools.ant.launch.Locator.getClassSource( | |||||
final File antlib = Locator.getClassSource( | |||||
Project.class); | Project.class); | ||||
if (antlib != null) { | if (antlib != null) { | ||||
setPropertyInternal(MagicNames.ANT_LIB, antlib.getAbsolutePath()); | setPropertyInternal(MagicNames.ANT_LIB, antlib.getAbsolutePath()); | ||||
@@ -18,6 +18,8 @@ | |||||
package org.apache.tools.ant.input; | package org.apache.tools.ant.input; | ||||
import org.apache.tools.ant.BuildException; | |||||
/** | /** | ||||
* Plugin to Ant to handle requests for user input. | * Plugin to Ant to handle requests for user input. | ||||
* | * | ||||
@@ -34,8 +36,8 @@ public interface InputHandler { | |||||
* <p>Postcondition: request.getInput will return a non-null | * <p>Postcondition: request.getInput will return a non-null | ||||
* value, request.isInputValid will return true.</p> | * value, request.isInputValid will return true.</p> | ||||
* @param request the request to be processed | * @param request the request to be processed | ||||
* @throws org.apache.tools.ant.BuildException if the input cannot be read from the console | |||||
* @throws BuildException if the input cannot be read from the console | |||||
*/ | */ | ||||
void handleInput(InputRequest request) | void handleInput(InputRequest request) | ||||
throws org.apache.tools.ant.BuildException; | |||||
throws BuildException; | |||||
} | } |
@@ -231,7 +231,7 @@ public class MakeUrl extends Task { | |||||
/** | /** | ||||
* Create the url | * Create the url | ||||
* | * | ||||
* @throws org.apache.tools.ant.BuildException | |||||
* @throws BuildException | |||||
* if something goes wrong with the build | * if something goes wrong with the build | ||||
*/ | */ | ||||
@Override | @Override | ||||
@@ -69,8 +69,8 @@ public class Rename extends Task { | |||||
/** | /** | ||||
* Renames the file <code>src</code> to <code>dest</code> | * Renames the file <code>src</code> to <code>dest</code> | ||||
* @exception org.apache.tools.ant.BuildException The exception is | |||||
* thrown, if the rename operation fails. | |||||
* | |||||
* @throws BuildException if the rename operation fails | |||||
*/ | */ | ||||
public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
log("DEPRECATED - The rename task is deprecated. Use move instead."); | log("DEPRECATED - The rename task is deprecated. Use move instead."); | ||||
@@ -590,7 +590,7 @@ public class Rmic extends MatchingTask { | |||||
/** | /** | ||||
* execute by creating an instance of an implementation | * execute by creating an instance of an implementation | ||||
* class and getting to do the work | * class and getting to do the work | ||||
* @throws org.apache.tools.ant.BuildException | |||||
* @throws BuildException | |||||
* if there's a problem with baseDir or RMIC | * if there's a problem with baseDir or RMIC | ||||
*/ | */ | ||||
@Override | @Override | ||||
@@ -701,7 +701,7 @@ public class Rmic extends MatchingTask { | |||||
/** | /** | ||||
* Move the generated source file(s) to the base directory | * Move the generated source file(s) to the base directory | ||||
* | * | ||||
* @throws org.apache.tools.ant.BuildException When error | |||||
* @throws BuildException When error | |||||
* copying/removing files. | * copying/removing files. | ||||
*/ | */ | ||||
private void moveGeneratedFile(File baseDir, File sourceBaseFile, String classname, | private void moveGeneratedFile(File baseDir, File sourceBaseFile, String classname, | ||||
@@ -166,10 +166,9 @@ public class Sleep extends Task { | |||||
/** | /** | ||||
* Executes this build task. Throws org.apache.tools.ant.BuildException | |||||
* if there is an error during task execution. | |||||
* Executes this build task. | |||||
* | * | ||||
* @exception BuildException Description of Exception | |||||
* @throws BuildException if there is an error during task execution | |||||
*/ | */ | ||||
@Override | @Override | ||||
public void execute() | public void execute() | ||||
@@ -41,6 +41,7 @@ import org.apache.tools.ant.DynamicConfigurator; | |||||
import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
import org.apache.tools.ant.ProjectComponent; | import org.apache.tools.ant.ProjectComponent; | ||||
import org.apache.tools.ant.PropertyHelper; | import org.apache.tools.ant.PropertyHelper; | ||||
import org.apache.tools.ant.taskdefs.optional.TraXLiaison; | |||||
import org.apache.tools.ant.types.CommandlineJava; | import org.apache.tools.ant.types.CommandlineJava; | ||||
import org.apache.tools.ant.types.Environment; | import org.apache.tools.ant.types.Environment; | ||||
import org.apache.tools.ant.types.Mapper; | import org.apache.tools.ant.types.Mapper; | ||||
@@ -713,7 +714,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { | |||||
*/ | */ | ||||
private void resolveProcessor(final String proc) throws Exception { | private void resolveProcessor(final String proc) throws Exception { | ||||
if (proc.equals(PROCESSOR_TRAX)) { | if (proc.equals(PROCESSOR_TRAX)) { | ||||
liaison = new org.apache.tools.ant.taskdefs.optional.TraXLiaison(); | |||||
liaison = new TraXLiaison(); | |||||
} else { | } else { | ||||
//anything else is a classname | //anything else is a classname | ||||
final Class clazz = loadClass(proc); | final Class clazz = loadClass(proc); | ||||
@@ -27,6 +27,7 @@ import javax.xml.parsers.ParserConfigurationException; | |||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
import org.apache.tools.ant.Task; | |||||
import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
import org.apache.tools.ant.types.Resource; | import org.apache.tools.ant.types.Resource; | ||||
import org.apache.tools.ant.types.ResourceCollection; | import org.apache.tools.ant.types.ResourceCollection; | ||||
@@ -174,7 +175,7 @@ import org.xml.sax.SAXException; | |||||
* | * | ||||
* @ant.task name="xmlproperty" category="xml" | * @ant.task name="xmlproperty" category="xml" | ||||
*/ | */ | ||||
public class XmlProperty extends org.apache.tools.ant.Task { | |||||
public class XmlProperty extends Task { | |||||
private Resource src; | private Resource src; | ||||
private String prefix = ""; | private String prefix = ""; | ||||
@@ -136,7 +136,7 @@ public class IsReachable extends ProjectComponent implements Condition { | |||||
* | * | ||||
* @return true if the condition is true. | * @return true if the condition is true. | ||||
* | * | ||||
* @throws org.apache.tools.ant.BuildException | |||||
* @throws BuildException | |||||
* if an error occurs | * if an error occurs | ||||
*/ | */ | ||||
public boolean eval() throws BuildException { | public boolean eval() throws BuildException { | ||||
@@ -31,7 +31,7 @@ public class Xor extends ConditionBase implements Condition { | |||||
/** | /** | ||||
* Evaluate the contained conditions. | * Evaluate the contained conditions. | ||||
* @return the result of xoring the conditions together. | * @return the result of xoring the conditions together. | ||||
* @throws org.apache.tools.ant.BuildException | |||||
* @throws BuildException | |||||
* if an error occurs. | * if an error occurs. | ||||
*/ | */ | ||||
public boolean eval() throws BuildException { | public boolean eval() throws BuildException { | ||||
@@ -325,7 +325,7 @@ public class BorlandDeploymentTool extends GenericDeploymentTool | |||||
* @param sourceJar java.io.File representing the produced jar file | * @param sourceJar java.io.File representing the produced jar file | ||||
*/ | */ | ||||
private void verifyBorlandJarV4(File sourceJar) { | private void verifyBorlandJarV4(File sourceJar) { | ||||
org.apache.tools.ant.taskdefs.Java javaTask = null; | |||||
Java javaTask = null; | |||||
log("verify BAS " + sourceJar, Project.MSG_INFO); | log("verify BAS " + sourceJar, Project.MSG_INFO); | ||||
try { | try { | ||||
String args = verifyArgs; | String args = verifyArgs; | ||||
@@ -85,7 +85,7 @@ public abstract class AbstractHotDeploymentTool implements HotDeploymentTool { | |||||
* validation of boilerplate attributes. | * validation of boilerplate attributes. | ||||
* <p>Only the "action" attribute is required in the | * <p>Only the "action" attribute is required in the | ||||
* base class. Subclasses should check attributes accordingly. | * base class. Subclasses should check attributes accordingly. | ||||
* @exception org.apache.tools.ant.BuildException if the attributes are invalid or incomplete. | |||||
* @throws BuildException if the attributes are invalid or incomplete. | |||||
*/ | */ | ||||
public void validateAttributes() throws BuildException { | public void validateAttributes() throws BuildException { | ||||
if (task.getAction() == null) { | if (task.getAction() == null) { | ||||
@@ -88,7 +88,7 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool { | |||||
* Perform the actual deployment. | * Perform the actual deployment. | ||||
* For this generic implementation, a JVM is spawned using the | * For this generic implementation, a JVM is spawned using the | ||||
* supplied classpath, classname, JVM args, and command line arguments. | * supplied classpath, classname, JVM args, and command line arguments. | ||||
* @exception org.apache.tools.ant.BuildException if the attributes are invalid or incomplete. | |||||
* @exception BuildException if the attributes are invalid or incomplete. | |||||
*/ | */ | ||||
public void deploy() throws BuildException { | public void deploy() throws BuildException { | ||||
java.setClassname(className); | java.setClassname(className); | ||||
@@ -101,7 +101,7 @@ public class GenericHotDeploymentTool extends AbstractHotDeploymentTool { | |||||
/** | /** | ||||
* Validates the passed in attributes. | * Validates the passed in attributes. | ||||
* Ensures the className and arguments attribute have been set. | * Ensures the className and arguments attribute have been set. | ||||
* @exception org.apache.tools.ant.BuildException if the attributes are invalid or incomplete. | |||||
* @throws BuildException if the attributes are invalid or incomplete. | |||||
*/ | */ | ||||
public void validateAttributes() throws BuildException { | public void validateAttributes() throws BuildException { | ||||
super.validateAttributes(); | super.validateAttributes(); | ||||
@@ -43,13 +43,13 @@ public interface HotDeploymentTool { | |||||
/** | /** | ||||
* Validates the passed in attributes. | * Validates the passed in attributes. | ||||
* @exception org.apache.tools.ant.BuildException if the attributes are invalid or incomplete. | |||||
* @exception BuildException if the attributes are invalid or incomplete. | |||||
*/ | */ | ||||
void validateAttributes() throws BuildException; | void validateAttributes() throws BuildException; | ||||
/** | /** | ||||
* Perform the actual deployment. | * Perform the actual deployment. | ||||
* @exception org.apache.tools.ant.BuildException if the attributes are invalid or incomplete. | |||||
* @throws BuildException if the attributes are invalid or incomplete. | |||||
*/ | */ | ||||
void deploy() throws BuildException; | void deploy() throws BuildException; | ||||
@@ -97,7 +97,7 @@ public class ServerDeploy extends Task { | |||||
* <p>This method calls the deploy() method on each of the vendor-specific tools | * <p>This method calls the deploy() method on each of the vendor-specific tools | ||||
* in the <code>vendorTools</code> collection. This performs the actual | * in the <code>vendorTools</code> collection. This performs the actual | ||||
* process of deployment on each tool. | * process of deployment on each tool. | ||||
* @exception org.apache.tools.ant.BuildException if the attributes | |||||
* @throws BuildException if the attributes | |||||
* are invalid or incomplete, or a failure occurs in the deployment process. | * are invalid or incomplete, or a failure occurs in the deployment process. | ||||
*/ | */ | ||||
public void execute() throws BuildException { | public void execute() throws BuildException { | ||||
@@ -33,6 +33,7 @@ import java.util.Vector; | |||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
import org.apache.tools.ant.Task; | |||||
import org.apache.tools.ant.taskdefs.Execute; | import org.apache.tools.ant.taskdefs.Execute; | ||||
import org.apache.tools.ant.taskdefs.ExecuteStreamHandler; | import org.apache.tools.ant.taskdefs.ExecuteStreamHandler; | ||||
import org.apache.tools.ant.taskdefs.LogOutputStream; | import org.apache.tools.ant.taskdefs.LogOutputStream; | ||||
@@ -71,7 +72,7 @@ import org.apache.tools.ant.util.FileUtils; | |||||
* discussion. | * discussion. | ||||
* | * | ||||
*/ | */ | ||||
public class Pvcs extends org.apache.tools.ant.Task { | |||||
public class Pvcs extends Task { | |||||
// CheckStyle - magic numbers | // CheckStyle - magic numbers | ||||
// checking for "X:\ 0=dquote,1=letter,2=:,3=\ | // checking for "X:\ 0=dquote,1=letter,2=:,3=\ | ||||
private static final int POS_1 = 1; | private static final int POS_1 = 1; | ||||
@@ -143,7 +144,7 @@ public class Pvcs extends org.apache.tools.ant.Task { | |||||
} | } | ||||
/** | /** | ||||
* @exception org.apache.tools.ant.BuildException Something is stopping the build... | |||||
* @throws BuildException Something is stopping the build... | |||||
*/ | */ | ||||
public void execute() throws org.apache.tools.ant.BuildException { | public void execute() throws org.apache.tools.ant.BuildException { | ||||
int result = 0; | int result = 0; | ||||
@@ -32,6 +32,7 @@ package org.apache.tools.ant.taskdefs.optional.unix; | |||||
import java.io.File; | import java.io.File; | ||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.taskdefs.ExecuteOn; | |||||
import org.apache.tools.ant.taskdefs.condition.Os; | import org.apache.tools.ant.taskdefs.condition.Os; | ||||
import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
import org.apache.tools.ant.types.FileSet; | import org.apache.tools.ant.types.FileSet; | ||||
@@ -42,8 +43,7 @@ import org.apache.tools.ant.types.FileSet; | |||||
* @ant.task category="filesystem" | * @ant.task category="filesystem" | ||||
*/ | */ | ||||
public abstract class AbstractAccessTask | |||||
extends org.apache.tools.ant.taskdefs.ExecuteOn { | |||||
public abstract class AbstractAccessTask extends ExecuteOn { | |||||
/** | /** | ||||
* Chmod task for setting file and directory permissions. | * Chmod task for setting file and directory permissions. | ||||
@@ -27,6 +27,7 @@ import java.util.Vector; | |||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
import org.apache.tools.ant.taskdefs.Redirector; | import org.apache.tools.ant.taskdefs.Redirector; | ||||
import org.apache.tools.ant.util.MergingMapper; | |||||
/** | /** | ||||
* Element representation of a <code>Redirector</code>. | * Element representation of a <code>Redirector</code>. | ||||
@@ -556,8 +557,7 @@ public class RedirectorElement extends DataType { | |||||
*/ | */ | ||||
protected Mapper createMergeMapper(File destfile) { | protected Mapper createMergeMapper(File destfile) { | ||||
Mapper result = new Mapper(getProject()); | Mapper result = new Mapper(getProject()); | ||||
result.setClassname( | |||||
org.apache.tools.ant.util.MergingMapper.class.getName()); | |||||
result.setClassname(MergingMapper.class.getName()); | |||||
result.setTo(destfile.getAbsolutePath()); | result.setTo(destfile.getAbsolutePath()); | ||||
return result; | return result; | ||||
} | } | ||||
@@ -38,7 +38,7 @@ public class ScriptCondition extends AbstractScriptComponent implements Conditio | |||||
* | * | ||||
* @return true if the condition is true | * @return true if the condition is true | ||||
* | * | ||||
* @throws org.apache.tools.ant.BuildException | |||||
* @throws BuildException | |||||
* if an error occurs | * if an error occurs | ||||
*/ | */ | ||||
public boolean eval() throws BuildException { | public boolean eval() throws BuildException { | ||||
@@ -85,7 +85,7 @@ public class ScriptSelector extends BaseSelector { | |||||
/** | /** | ||||
* Initialize on demand. | * Initialize on demand. | ||||
* | * | ||||
* @throws org.apache.tools.ant.BuildException | |||||
* @throws BuildException | |||||
* if something goes wrong | * if something goes wrong | ||||
*/ | */ | ||||
private void init() throws BuildException { | private void init() throws BuildException { | ||||
@@ -78,7 +78,8 @@ public class TokenizedPath { | |||||
tokenizedPath[parent.tokenizedPath.length] = child; | tokenizedPath[parent.tokenizedPath.length] = child; | ||||
} | } | ||||
/* package */ TokenizedPath(String path, String[] tokens) { | |||||
/* package */ | |||||
TokenizedPath(String path, String[] tokens) { | |||||
this.path = path; | this.path = path; | ||||
this.tokenizedPath = tokens; | this.tokenizedPath = tokens; | ||||
} | } | ||||
@@ -397,6 +397,7 @@ public class ModifiedSelector extends BaseExtendSelector | |||||
* @param type the type to check against | * @param type the type to check against | ||||
* @return a castable object | * @return a castable object | ||||
*/ | */ | ||||
@SuppressWarnings("unchecked") | |||||
protected <T> T loadClass(String classname, String msg, Class<? extends T> type) { | protected <T> T loadClass(String classname, String msg, Class<? extends T> type) { | ||||
try { | try { | ||||
// load the specified class | // load the specified class | ||||
@@ -244,7 +244,7 @@ public class ZipTest { | |||||
@Test | @Test | ||||
public void testTarFileSet() throws IOException { | public void testTarFileSet() throws IOException { | ||||
buildRule.executeTarget("testTarFileSet"); | |||||
buildRule.executeTarget("testTarFileSet"); | |||||
org.apache.tools.zip.ZipFile zf = null; | org.apache.tools.zip.ZipFile zf = null; | ||||
try { | try { | ||||
zf = new org.apache.tools.zip.ZipFile(new File(buildRule.getProject().getProperty("output"), "test3.zip")); | zf = new org.apache.tools.zip.ZipFile(new File(buildRule.getProject().getProperty("output"), "test3.zip")); | ||||
@@ -18,6 +18,7 @@ | |||||
package org.apache.tools.ant.taskdefs.optional; | package org.apache.tools.ant.taskdefs.optional; | ||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.Project; | |||||
import org.apache.tools.ant.taskdefs.Execute; | import org.apache.tools.ant.taskdefs.Execute; | ||||
import org.apache.tools.ant.taskdefs.ExecuteStreamHandler; | import org.apache.tools.ant.taskdefs.ExecuteStreamHandler; | ||||
import org.apache.tools.ant.types.Commandline; | import org.apache.tools.ant.types.Commandline; | ||||
@@ -32,7 +33,7 @@ public class RpmTest { | |||||
@Test | @Test | ||||
public void testShouldThrowExceptionWhenRpmFails() throws Exception { | public void testShouldThrowExceptionWhenRpmFails() throws Exception { | ||||
Rpm rpm = new MyRpm(); | Rpm rpm = new MyRpm(); | ||||
rpm.setProject(new org.apache.tools.ant.Project()); | |||||
rpm.setProject(new Project()); | |||||
rpm.setFailOnError(true); | rpm.setFailOnError(true); | ||||
// execute | // execute | ||||
try { | try { | ||||