Browse Source

overload isOutOfDate with long granularity for consistency's sake.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@290810 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
33e3b2533d
1 changed files with 20 additions and 1 deletions
  1. +20
    -1
      src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java

+ 20
- 1
src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java View File

@@ -595,12 +595,31 @@ public final class SelectorUtils {
*
* @param src the original resource
* @param target the resource being compared against
* @param granularity the amount in seconds of slack we will give in
* @param granularity the int amount in seconds of slack we will give in
* determining out of dateness
* @return whether the target is out of date
*/
public static boolean isOutOfDate(Resource src, Resource target,
int granularity) {
return isOutOfDate(src, target, (long) granularity);
}

/**
* Returns dependency information on these two resources. If src has been
* modified later than target, it returns true. If target doesn't exist,
* it likewise returns true. Otherwise, target is newer than src and
* is not out of date, thus the method returns false. It also returns
* false if the src file doesn't even exist, since how could the
* target then be out of date.
*
* @param src the original resource
* @param target the resource being compared against
* @param granularity the long amount in seconds of slack we will give in
* determining out of dateness
* @return whether the target is out of date
*/
public static boolean isOutOfDate(Resource src, Resource target,
long granularity) {
if (!src.isExists()) {
return false;
}


Loading…
Cancel
Save