From b85b78ce08a5823bce29a951899ac569dcd6591d Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 3 Dec 2008 15:50:20 +0000 Subject: [PATCH] don't say a file was modified in the future if it has been modified a second ago. PR 43665. Submitted by Kim Hansen. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@722942 13f79535-47bb-0310-9956-ffa450edef68 --- CONTRIBUTORS | 1 + WHATSNEW | 5 +++++ contributors.xml | 4 ++++ src/main/org/apache/tools/ant/taskdefs/DependSet.java | 3 +++ 4 files changed, 13 insertions(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a8fcb017a..6c43e8fa1 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -159,6 +159,7 @@ Kevin Greiner Kevin Jackson Kevin Ross Kevin Z Grey +Kim Hansen Kirk Wylie Kyle Adams Larry Shatzer diff --git a/WHATSNEW b/WHATSNEW index 0125397a4..b3d84d9f3 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -300,6 +300,11 @@ Fixed bugs: using TraX) before falling back to Ant's own classpath. Bugzilla Report 46172. + * complained about files being modified in the future if + they had been just very recently (within Ant's assumed granularity + of the file system). + Bugzilla Report 43665. + Other changes: -------------- diff --git a/contributors.xml b/contributors.xml index 20535caad..7e35ff66e 100644 --- a/contributors.xml +++ b/contributors.xml @@ -667,6 +667,10 @@ Z Grey + + Kim + Hansen + Kirk Wylie diff --git a/src/main/org/apache/tools/ant/taskdefs/DependSet.java b/src/main/org/apache/tools/ant/taskdefs/DependSet.java index dd368c121..8fcd14fea 100644 --- a/src/main/org/apache/tools/ant/taskdefs/DependSet.java +++ b/src/main/org/apache/tools/ant/taskdefs/DependSet.java @@ -197,6 +197,9 @@ public class DependSet extends MatchingTask { = new org.apache.tools.ant.types.resources.selectors.Date(); datesel.setMillis(System.currentTimeMillis()); datesel.setWhen(TimeComparison.AFTER); + // don't whine because a file has changed during the last + // second (or whathever our current granularity may be) + datesel.setGranularity(0); logFuture(targets, datesel); int neTargets = new NonExistent(targets).size();