Browse Source

some extra verbose diagnostics

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@805270 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
f597873967
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java

+ 5
- 0
src/main/org/apache/tools/ant/taskdefs/condition/IsLastModified.java View File

@@ -21,8 +21,10 @@ package org.apache.tools.ant.taskdefs.condition;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date;


import org.apache.tools.ant.BuildException; import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.ProjectComponent; import org.apache.tools.ant.ProjectComponent;
import org.apache.tools.ant.taskdefs.Touch; import org.apache.tools.ant.taskdefs.Touch;
import org.apache.tools.ant.types.EnumeratedAttribute; import org.apache.tools.ant.types.EnumeratedAttribute;
@@ -147,6 +149,9 @@ public class IsLastModified extends ProjectComponent implements Condition {
validate(); validate();
long expected = getMillis(); long expected = getMillis();
long actual = resource.getLastModified(); long actual = resource.getLastModified();
log("expected timestamp: " + expected + " (" + new Date(expected) + ")"
+ ", actual timestamp: " + actual + " (" + new Date(actual) + ")" ,
Project.MSG_VERBOSE);
if (CompareMode.EQUALS_TEXT.equals(mode.getValue())) { if (CompareMode.EQUALS_TEXT.equals(mode.getValue())) {
return expected == actual; return expected == actual;
} }


Loading…
Cancel
Save