Browse Source

implement sameDefinition for preset definition

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275100 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 22 years ago
parent
commit
95893de3f6
1 changed files with 12 additions and 1 deletions
  1. +12
    -1
      src/main/org/apache/tools/ant/taskdefs/PreSetDef.java

+ 12
- 1
src/main/org/apache/tools/ant/taskdefs/PreSetDef.java View File

@@ -150,7 +150,6 @@ public class PreSetDef extends Task implements AntlibInterface, TaskContainer {
nestedTask.getNamespace(), nestedTask.getTag());

AntTypeDefinition def = helper.getDefinition(componentName);

if (def == null) {
throw new BuildException(
"Unable to find typedef " + componentName);
@@ -264,5 +263,17 @@ public class PreSetDef extends Task implements AntlibInterface, TaskContainer {
element.configure(o);
return o;
}

/**
* Equality method for this definition
* This only checks for pointer equality.
*
* @param other another definition
* @param project the current project
* @return true if the definitions are the same
*/
public boolean sameDefinition(AntTypeDefinition other, Project project) {
return this == other;
}
}
}

Loading…
Cancel
Save