From 63c5a21f1ff9c6c3a63d96d308dd2f1d62bf5a64 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Tue, 19 Sep 2006 20:53:19 +0000 Subject: [PATCH] Bugzilla 40547: was broken git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@447966 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 3 +++ .../org/apache/tools/ant/IntrospectionHelper.java | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index 222f80fbb..fff64d702 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -12,6 +12,9 @@ Fixed bugs: * with file and todir option failed. Bugzilla report 37386. +* was broken (Regression from beta1). + Bugzilla report 40547. + Other changes: -------------- diff --git a/src/main/org/apache/tools/ant/IntrospectionHelper.java b/src/main/org/apache/tools/ant/IntrospectionHelper.java index 227d50869..9179b7e75 100644 --- a/src/main/org/apache/tools/ant/IntrospectionHelper.java +++ b/src/main/org/apache/tools/ant/IntrospectionHelper.java @@ -168,7 +168,6 @@ public final class IntrospectionHelper implements BuildListener { */ private IntrospectionHelper(final Class bean) { this.bean = bean; - Method[] methods = bean.getMethods(); for (int i = 0; i < methods.length; i++) { final Method m = methods[i]; @@ -199,7 +198,6 @@ public final class IntrospectionHelper implements BuildListener { } else if (name.startsWith("set") && java.lang.Void.TYPE.equals(returnType) && args.length == 1 && !args[0].isArray()) { - String propName = getPropertyName(name, "set"); if (attributeSetters.get(propName) != null) { if (java.lang.String.class.equals(args[0])) { @@ -211,8 +209,17 @@ public final class IntrospectionHelper implements BuildListener { */ continue; } + if (org.apache.tools.ant.Location.class.equals(args[0])) { + /* + Ignore setLocation(Location) (normally from + ProjectComponent.setLocation(Location) in honour + of setLocation(Some other class) + */ + continue; + } /* - If the argument is not a String, and if there + If the argument is not a String or Location, + and if there is an overloaded form of this method already defined, we just override that with the new one. This mechanism does not guarantee any specific order