You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mb...@apache.org on 2005/09/21 21:52:45 UTC
svn commit: r290810 -
/ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
Author: mbenson
Date: Wed Sep 21 12:52:41 2005
New Revision: 290810
URL: http://svn.apache.org/viewcvs?rev=290810&view=rev
Log:
overload isOutOfDate with long granularity for consistency's sake.
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java?rev=290810&r1=290809&r2=290810&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java Wed Sep 21 12:52:41 2005
@@ -595,12 +595,31 @@
*
* @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;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org