From 768bfa2bc695cbe0a6098add639d6c6ef5be8de1 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 21 Dec 2001 10:55:14 +0000 Subject: [PATCH] If addConfiguredXyz and addXyz (or createXyz) have been present in the same class, under some conditions, both would be called. This patch ensures that only the last method returned by the introspection methods for a given nested element will be used, no matter which comes last. Submitted by: Adam Murdoch git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270276 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/IntrospectionHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/org/apache/tools/ant/IntrospectionHelper.java b/src/main/org/apache/tools/ant/IntrospectionHelper.java index 22dbba6eb..75ce77966 100644 --- a/src/main/org/apache/tools/ant/IntrospectionHelper.java +++ b/src/main/org/apache/tools/ant/IntrospectionHelper.java @@ -208,6 +208,7 @@ public class IntrospectionHelper implements BuildListener { } }); + nestedStorers.remove(propName); } else if (name.startsWith("addConfigured") && java.lang.Void.TYPE.equals(returnType) @@ -265,6 +266,7 @@ public class IntrospectionHelper implements BuildListener { } }); + nestedStorers.remove(name); } catch (NoSuchMethodException nse) { } }