Browse Source

Bug 48816 - If <concat>'s first resourcecollection child is a <resources>, any subsequently added child resourcecollection joins the first

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@916372 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 15 years ago
parent
commit
91df263ee0
2 changed files with 14 additions and 14 deletions
  1. +5
    -1
      WHATSNEW
  2. +9
    -13
      src/main/org/apache/tools/ant/taskdefs/Concat.java

+ 5
- 1
WHATSNEW View File

@@ -37,7 +37,11 @@ Fixed bugs:
Bugzilla Report 48746
* SymlinkTest#testSymbolicLinkUtilsMethods failing on MacOS
Bugzilla Report 48785.
Bugzilla Report 48785.

* If <concat>'s first resourcecollection child is a <resources>,
any subsequently added child resourcecollection joins the first.
Bugzilla Report 48816.

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


+ 9
- 13
src/main/org/apache/tools/ant/taskdefs/Concat.java View File

@@ -465,7 +465,7 @@ public class Concat extends Task implements ResourceCollection {
* Stores a collection of file sets and/or file lists, used to
* select multiple files for concatenation.
*/
private ResourceCollection rc;
private Resources rc;

/** for filtering the concatenated */
private Vector filterChains;
@@ -634,19 +634,15 @@ public class Concat extends Task implements ResourceCollection {
* @param c the ResourceCollection to add.
* @since Ant 1.7
*/
public synchronized void add(ResourceCollection c) {
if (rc == null) {
rc = c;
return;
}
if (!(rc instanceof Resources)) {
Resources newRc = new Resources();
newRc.setProject(getProject());
newRc.setCache(true);
newRc.add(rc);
rc = newRc;
public void add(ResourceCollection c) {
synchronized (this) {
if (rc == null) {
rc = new Resources();
rc.setProject(getProject());
rc.setCache(true);
}
}
((Resources) rc).add(c);
rc.add(c);
}

/**


Loading…
Cancel
Save