Browse Source

<macrodef> with default values set by properties would be

seen as new definitions when called twice with different properties.
  This was confusing so the definitions are now treated as similar.
PR: 31215


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277968 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
04330159c2
2 changed files with 11 additions and 0 deletions
  1. +5
    -0
      WHATSNEW
  2. +6
    -0
      src/main/org/apache/tools/ant/taskdefs/MacroDef.java

+ 5
- 0
WHATSNEW View File

@@ -275,6 +275,11 @@ Other changes:
* The .NET compilation tasks failed if filenames given as references
contained spaces. Bugzilla Report 27170.

* <macrodef> with default values set by properties would be
seen as new definitions when called twice with different properties.
This was confusing so the definitions are now treated as similar.
Bugzilla Report 31215.

Fixed bugs:
-----------



+ 6
- 0
src/main/org/apache/tools/ant/taskdefs/MacroDef.java View File

@@ -716,6 +716,12 @@ public class MacroDef extends AntlibDefinition {
if (!name.equals(other.name)) {
return false;
}
// Allow two macro definitions with the same location
// to be treated as similar - bugzilla 31215
if (other.getLocation() != null
&& other.getLocation().equals(getLocation())) {
return true;
}
if (text == null) {
if (other.text != null) {
return false;


Loading…
Cancel
Save