Hi,
A tiny patch to IntrospectionHelper. This fixes the case where a class has
an 'addConfigured' method and an 'add' or 'create' method for the same
element. Depending on the order that Class.getMethods() returns the class'
methods, Ant will sometimes call both methods, and sometimes call only one
of them.
This patch fixes this so that Ant will only ever call one of the
'addConfigured', 'add' or 'create' methods for a nested element.
Adam
Index: src/main/org/apache/tools/ant/IntrospectionHelper.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/IntrospectionHelper.java,v
retrieving revision 1.27
diff -u -r1.27 IntrospectionHelper.java
--- src/main/org/apache/tools/ant/IntrospectionHelper.java 2001/12/04
20:34:29 1.27
+++ src/main/org/apache/tools/ant/IntrospectionHelper.java 2001/12/18
01:14:15
@@ -208,6 +208,7 @@
}
});
+ nestedStorers.remove(propName);
} else if (name.startsWith("addConfigured")
&& java.lang.Void.TYPE.equals(returnType)
@@ -265,6 +266,7 @@
}
});
+ nestedStorers.remove(name);
} catch (NoSuchMethodException nse) {
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>