Author: mbenson
Date: Wed Jan 10 11:48:57 2007
New Revision: 494953

URL: http://svn.apache.org/viewvc?view=rev&rev=494953
Log:
when child resource collection added with null Project, it inherits ours

Modified:
    
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
    
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java?view=diff&rev=494953&r1=494952&r2=494953
==============================================================================
--- 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionContainer.java
 Wed Jan 10 11:48:57 2007
@@ -82,6 +82,12 @@
         if (c == null) {
             return;
         }
+        if (Project.getProject(c) == null) {
+            Project p = getProject();
+            if (p != null) {
+                p.setProjectReference(c);
+            }
+        }
         rc.add(c);
         FailFast.invalidate(this);
         coll = null;

Modified: 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java
URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java?view=diff&rev=494953&r1=494952&r2=494953
==============================================================================
--- 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java
 (original)
+++ 
ant/core/trunk/src/main/org/apache/tools/ant/types/resources/BaseResourceCollectionWrapper.java
 Wed Jan 10 11:48:57 2007
@@ -73,6 +73,12 @@
             throw oneNested();
         }
         rc = c;
+        if (Project.getProject(rc) == null) {
+            Project p = getProject();
+            if (p != null) {
+                p.setProjectReference(rc);
+            }
+        }
         setChecked(false);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to