ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r494953 - in /ant/core/trunk/src/main/org/apache/tools/ant/types/resources: BaseResourceCollectionContainer.java BaseResourceCollectionWrapper.java
Date Wed, 10 Jan 2007 19:48:58 GMT
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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message