From 4ff85c206109f1d7e25875130a6b7172e05ac21d Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 23 Sep 2003 05:59:04 +0000 Subject: [PATCH] Make PreSetDef compile git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275288 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tools/ant/taskdefs/PreSetDef.java | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java b/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java index b43860c72..8dc78f86e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java +++ b/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java @@ -77,10 +77,9 @@ import org.apache.tools.ant.UnknownElement; * @author Peter Reilly * @since Ant 1.6 */ -public class PreSetDef extends Task implements AntlibInterface, TaskContainer { +public class PreSetDef extends AntlibDefinition implements TaskContainer { private UnknownElement nestedTask; private String name; - private String uri; /** * Name of the definition @@ -89,29 +88,6 @@ public class PreSetDef extends Task implements AntlibInterface, TaskContainer { public void setName(String 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 ClassLoader value - */ - public void setAntlibClassLoader(ClassLoader classLoader) { - // Ignore - } - /** * 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"); } - name = ProjectHelper.genComponentName(uri, name); + name = ProjectHelper.genComponentName(getURI(), name); ComponentHelper helper = ComponentHelper.getComponentHelper( getProject());