Browse Source

Bugzilla 40547: <path location='x'> was broken

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@447966 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 19 years ago
parent
commit
63c5a21f1f
2 changed files with 13 additions and 3 deletions
  1. +3
    -0
      WHATSNEW
  2. +10
    -3
      src/main/org/apache/tools/ant/IntrospectionHelper.java

+ 3
- 0
WHATSNEW View File

@@ -12,6 +12,9 @@ Fixed bugs:


* <checksum> with file and todir option failed. Bugzilla report 37386. * <checksum> with file and todir option failed. Bugzilla report 37386.


* <path location="loc"> was broken (Regression from beta1).
Bugzilla report 40547.

Other changes: Other changes:
-------------- --------------




+ 10
- 3
src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -168,7 +168,6 @@ public final class IntrospectionHelper implements BuildListener {
*/ */
private IntrospectionHelper(final Class bean) { private IntrospectionHelper(final Class bean) {
this.bean = bean; this.bean = bean;

Method[] methods = bean.getMethods(); Method[] methods = bean.getMethods();
for (int i = 0; i < methods.length; i++) { for (int i = 0; i < methods.length; i++) {
final Method m = methods[i]; final Method m = methods[i];
@@ -199,7 +198,6 @@ public final class IntrospectionHelper implements BuildListener {
} else if (name.startsWith("set") } else if (name.startsWith("set")
&& java.lang.Void.TYPE.equals(returnType) && java.lang.Void.TYPE.equals(returnType)
&& args.length == 1 && !args[0].isArray()) { && args.length == 1 && !args[0].isArray()) {

String propName = getPropertyName(name, "set"); String propName = getPropertyName(name, "set");
if (attributeSetters.get(propName) != null) { if (attributeSetters.get(propName) != null) {
if (java.lang.String.class.equals(args[0])) { if (java.lang.String.class.equals(args[0])) {
@@ -211,8 +209,17 @@ public final class IntrospectionHelper implements BuildListener {
*/ */
continue; 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, is an overloaded form of this method already defined,
we just override that with the new one. we just override that with the new one.
This mechanism does not guarantee any specific order This mechanism does not guarantee any specific order


Loading…
Cancel
Save