Browse Source

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 <adammurdoch_ml@yahoo.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270276 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
768bfa2bc6
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/main/org/apache/tools/ant/IntrospectionHelper.java

+ 2
- 0
src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -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) {
}
}


Loading…
Cancel
Save