From 95893de3f6c233173ffb95c7c0c02063b041c9dd Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Fri, 15 Aug 2003 08:42:52 +0000 Subject: [PATCH] implement sameDefinition for preset definition git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275100 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/taskdefs/PreSetDef.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java b/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java index c94b76168..a62d6f5fa 100644 --- a/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java +++ b/src/main/org/apache/tools/ant/taskdefs/PreSetDef.java @@ -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; + } } }