Browse Source

Make PreSetDef compile

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275288 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
4ff85c2061
1 changed files with 2 additions and 26 deletions
  1. +2
    -26
      src/main/org/apache/tools/ant/taskdefs/PreSetDef.java

+ 2
- 26
src/main/org/apache/tools/ant/taskdefs/PreSetDef.java View File

@@ -77,10 +77,9 @@ import org.apache.tools.ant.UnknownElement;
* @author Peter Reilly * @author Peter Reilly
* @since Ant 1.6 * @since Ant 1.6
*/ */
public class PreSetDef extends Task implements AntlibInterface, TaskContainer {
public class PreSetDef extends AntlibDefinition implements TaskContainer {
private UnknownElement nestedTask; private UnknownElement nestedTask;
private String name; private String name;
private String uri;


/** /**
* Name of the definition * Name of the definition
@@ -89,29 +88,6 @@ public class PreSetDef extends Task implements AntlibInterface, TaskContainer {
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
/**
* The URI for this definition.
* @param uri the namespace URI
* @throws BuildException if uri is not allowed
*/
public void setURI(String uri) throws BuildException {
if (uri.equals(ProjectHelper.ANT_CORE_URI)) {
uri = "";
}
if (uri.startsWith("ant:")) {
throw new BuildException("Attempt to use a reserved URI " + uri);
}
this.uri = uri;
}
/**
* Set the class loader.
* Not used
* @param classLoader a <code>ClassLoader</code> value
*/
public void setAntlibClassLoader(ClassLoader classLoader) {
// Ignore
}



/** /**
* Add a nested task to predefine attributes and elements on * Add a nested task to predefine attributes and elements on
@@ -140,7 +116,7 @@ public class PreSetDef extends Task implements AntlibInterface, TaskContainer {
throw new BuildException("Name not specified"); throw new BuildException("Name not specified");
} }


name = ProjectHelper.genComponentName(uri, name);
name = ProjectHelper.genComponentName(getURI(), name);


ComponentHelper helper = ComponentHelper.getComponentHelper( ComponentHelper helper = ComponentHelper.getComponentHelper(
getProject()); getProject());


Loading…
Cancel
Save