Browse Source

when child resource collection added with null Project, it inherits ours

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@494953 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 18 years ago
parent
commit
c1bf9805b5
2 changed files with 12 additions and 0 deletions
  1. +6
    -0
      src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
  2. +6
    -0
      src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java

+ 6
- 0
src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java View File

@@ -82,6 +82,12 @@ public abstract class BaseResourceCollectionContainer
if (c == null) { if (c == null) {
return; return;
} }
if (Project.getProject(c) == null) {
Project p = getProject();
if (p != null) {
p.setProjectReference(c);
}
}
rc.add(c); rc.add(c);
FailFast.invalidate(this); FailFast.invalidate(this);
coll = null; coll = null;


+ 6
- 0
src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java View File

@@ -73,6 +73,12 @@ public abstract class BaseResourceCollectionWrapper
throw oneNested(); throw oneNested();
} }
rc = c; rc = c;
if (Project.getProject(rc) == null) {
Project p = getProject();
if (p != null) {
p.setProjectReference(rc);
}
}
setChecked(false); setChecked(false);
} }




Loading…
Cancel
Save