diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index fb165f825..d3ea7522e 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -202,11 +202,12 @@ Marcel Schutte
Marcus Börger
Mario Frasca
Mariusz Nowostawski
+Mark A. Ziesemer
Mark DeLaFranier
Mark Hecker
-Mark Salter
Mark R. Diggory
-Mark A. Ziesemer
+Mark Salter
+Markus Kahl
Martijn Kruithof
Martin Landers
Martin Poeschl
diff --git a/WHATSNEW b/WHATSNEW
index df4f23cec..10341aa7e 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -104,6 +104,10 @@ Fixed bugs:
* packagemapper now honors the handleDirSep attribute.
Bugzilla Report 51068.
+ * the attributes of macrodef tasks had their values run through
+ property expansion twice.
+ Bugzilla Report 42046.
+
Other changes:
--------------
diff --git a/contributors.xml b/contributors.xml
index 94197c71e..bbf430258 100644
--- a/contributors.xml
+++ b/contributors.xml
@@ -860,6 +860,10 @@
A.
Ziesemer
+
+ Markus
+ Kahl
+
Martijn
Kruithof
diff --git a/src/main/org/apache/tools/ant/RuntimeConfigurable.java b/src/main/org/apache/tools/ant/RuntimeConfigurable.java
index 5cf72c5ea..a33c7e477 100644
--- a/src/main/org/apache/tools/ant/RuntimeConfigurable.java
+++ b/src/main/org/apache/tools/ant/RuntimeConfigurable.java
@@ -29,6 +29,7 @@ import java.util.Map;
import java.util.Iterator;
import org.apache.tools.ant.util.CollectionUtils;
+import org.apache.tools.ant.taskdefs.MacroInstance;
import org.xml.sax.AttributeList;
import org.xml.sax.helpers.AttributeListImpl;
@@ -382,8 +383,15 @@ public class RuntimeConfigurable implements Serializable {
String name = (String) entry.getKey();
String value = (String) entry.getValue();
- // reflect these into the target
- Object attrValue = PropertyHelper.getPropertyHelper(p).parseProperties(value);
+ // reflect these into the target, defer for
+ // MacroInstance where properties are expanded for the
+ // nested sequential
+ Object attrValue = null;
+ if (target instanceof MacroInstance) {
+ attrValue = value;
+ } else {
+ attrValue = PropertyHelper.getPropertyHelper(p).parseProperties(value);
+ }
try {
ih.setAttribute(p, target, name, attrValue);
} catch (UnsupportedAttributeException be) {
diff --git a/src/tests/antunit/taskdefs/macrodef-test.xml b/src/tests/antunit/taskdefs/macrodef-test.xml
index 460bdf9e3..7686a5484 100644
--- a/src/tests/antunit/taskdefs/macrodef-test.xml
+++ b/src/tests/antunit/taskdefs/macrodef-test.xml
@@ -33,5 +33,16 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/tests/antunit/taskdefs/property-test.xml b/src/tests/antunit/taskdefs/property-test.xml
index 5e0f38084..382f39f48 100644
--- a/src/tests/antunit/taskdefs/property-test.xml
+++ b/src/tests/antunit/taskdefs/property-test.xml
@@ -101,8 +101,8 @@ y=$${bar.x}
-
+
+
diff --git a/src/tests/antunit/taskdefs/propertyhelper-test.xml b/src/tests/antunit/taskdefs/propertyhelper-test.xml
index 56ba64e03..b46d5a612 100644
--- a/src/tests/antunit/taskdefs/propertyhelper-test.xml
+++ b/src/tests/antunit/taskdefs/propertyhelper-test.xml
@@ -107,7 +107,7 @@
-
+
@@ -125,4 +125,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+