ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r957442 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/types/resources/FileResource.java
Date Thu, 24 Jun 2010 07:39:11 GMT
Author: bodewig
Date: Thu Jun 24 07:39:11 2010
New Revision: 957442

URL: http://svn.apache.org/viewvc?rev=957442&view=rev
Log:
log a warning message if File#setLastModified fails.  PR 49485

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=957442&r1=957441&r2=957442&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Jun 24 07:39:11 2010
@@ -112,6 +112,11 @@ Other changes:
    scenarios where a given extension-point may or may not exist.
    Bugzilla Report 49473.   
 
+ * Ant now logs a warning message if it fails to change the file
+   modification time in for example when using <touch> or preserving
+   timestamps in various tasks.
+   Bugzilla Report 49485.
+
 Changes from Ant 1.8.0 TO Ant 1.8.1 
 ===================================
 

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=957442&r1=957441&r2=957442&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 Thu Jun
24 07:39:11 2010
@@ -345,7 +345,9 @@ public class FileResource extends Resour
             ((FileResource) getCheckedRef()).touch(modTime);
             return;
         }
-        getNotNullFile().setLastModified(modTime);
+        if (!getNotNullFile().setLastModified(modTime)) {
+            log("Failed to change file modification time", Project.MSG_WARN);
+        }
     }
 
     /**



Mime
View raw message