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); + } } /**