From 7f60f6397763a4da7afb05022b7374397a389e05 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Fri, 13 Dec 2002 14:51:03 +0000 Subject: [PATCH] addConfiguredXXX was not working for TaskAdpater wrapped classes git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273664 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/RuntimeConfigurable.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/RuntimeConfigurable.java b/src/main/org/apache/tools/ant/RuntimeConfigurable.java index 7ea109632..4f4546754 100644 --- a/src/main/org/apache/tools/ant/RuntimeConfigurable.java +++ b/src/main/org/apache/tools/ant/RuntimeConfigurable.java @@ -249,7 +249,7 @@ public class RuntimeConfigurable { * to invalid attributes or children, or text being added to * an element which doesn't accept it. */ - public void maybeConfigure(Project p, boolean configureChildren) + public void maybeConfigure(Project p, boolean configureChildren) throws BuildException { String id = null; @@ -293,7 +293,11 @@ public class RuntimeConfigurable { } else { child.maybeConfigure(p); } - ProjectHelper.storeChild(p, wrappedObject, child.wrappedObject, + Object container = wrappedObject; + if (container instanceof TaskAdapter) { + container = ((TaskAdapter) container).getProxy(); + } + ProjectHelper.storeChild(p, container, child.wrappedObject, child.getElementTag() .toLowerCase(Locale.US)); }