ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1151388 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Sync.java
Date Wed, 27 Jul 2011 08:55:00 GMT
Author: bodewig
Date: Wed Jul 27 08:55:00 2011
New Revision: 1151388

URL: http://svn.apache.org/viewvc?rev=1151388&view=rev
Log:
no reason to keep a reference to the enclosing Restrict instance

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Sync.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Sync.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Sync.java?rev=1151388&r1=1151387&r2=1151388&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Sync.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Sync.java Wed Jul 27 08:55:00 2011
@@ -65,8 +65,7 @@ public class Sync extends Task {
     // Similar to a fileset, but doesn't allow dir attribute to be set
     private SyncTarget syncTarget;
 
-    private Restrict resources = null;
-    private Resources nestedResources = null;
+    private Resources resources = null;
 
     // Override Task#init
     /**
@@ -401,12 +400,12 @@ public class Sync extends Task {
             myCopy.add(rc);
         } else {
             if (resources == null) {
-                resources = new Restrict();
-                resources.add(new Exists());
-                resources.add(nestedResources = new Resources());
-                myCopy.add(resources);
+                Restrict r = new Restrict(); 
+                r.add(new Exists());
+                r.add(resources = new Resources());
+                myCopy.add(r);
             }
-            nestedResources.add(rc);
+            resources.add(rc);
         }
     }
 



Mime
View raw message