ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1090325 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/resources/FileResource.java
Date Fri, 08 Apr 2011 16:24:20 GMT
Author: mbenson
Date: Fri Apr  8 16:24:19 2011
New Revision: 1090325

URL: http://svn.apache.org/viewvc?rev=1090325&view=rev
Log:
fix fileResource specified using basedir/name attributes

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=1090325&r1=1090324&r2=1090325&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Fri Apr  8 16:24:19 2011
@@ -32,6 +32,8 @@ Fixed bugs:
  * Read on System.in hangs for forked java task.
    Bugzilla Report 50960.
 
+ * FileResource specified using basedir/name attributes was non-functional.
+
 Other changes:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java?rev=1090325&r1=1090324&r2=1090325&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/FileResource.java Fri Apr
 8 16:24:19 2011
@@ -108,6 +108,16 @@ public class FileResource extends Resour
             return ((FileResource) getCheckedRef()).getFile();
         }
         dieOnCircularReference();
+        synchronized (this) {
+            if (file == null) {
+                //try to resolve file set via basedir/name property setters:
+                File d = getBaseDir();
+                String n = super.getName();
+                if (n != null) {
+                    setFile(FILE_UTILS.resolveFile(d, n));
+                }
+            }
+        }
         return file;
     }
 



Mime
View raw message