diff --git a/docs/manual/CoreTasks/libraries.html b/docs/manual/CoreTasks/libraries.html index 2f2f669d9..7c3e1baf8 100644 --- a/docs/manual/CoreTasks/libraries.html +++ b/docs/manual/CoreTasks/libraries.html @@ -57,6 +57,13 @@
This policy tells Ant to check the repository to see if the files have changed -using timestamp checks. Any files which are up to date will not be downloaded again.
+using timestamp checks. Any files which are up to date will not be downloaded again. +It is equivalent to setting theuseTimestamp flag.
Example:
diff --git a/src/main/org/apache/tools/ant/taskdefs/repository/ForceUpdatePolicy.java b/src/main/org/apache/tools/ant/taskdefs/repository/ForceUpdatePolicy.java
index b5c19096d..029cf4876 100644
--- a/src/main/org/apache/tools/ant/taskdefs/repository/ForceUpdatePolicy.java
+++ b/src/main/org/apache/tools/ant/taskdefs/repository/ForceUpdatePolicy.java
@@ -47,7 +47,7 @@ public class ForceUpdatePolicy extends BaseLibraryPolicy {
*/
public boolean beforeConnect(Libraries owner, ListIterator libraries) {
owner.markAllLibrariesForFetch(true);
- owner._setUseTimestamp(false);
+ owner.setUseTimestamp(false);
return true;
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java b/src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java
index 706f2953a..7059b0df6 100644
--- a/src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java
+++ b/src/main/org/apache/tools/ant/taskdefs/repository/Libraries.java
@@ -325,7 +325,7 @@ public final class Libraries extends Task {
* set the timestamp flag. Not for export into XML
* @param useTimestamp
*/
- public void _setUseTimestamp(boolean useTimestamp) {
+ public void setUseTimestamp(boolean useTimestamp) {
this.useTimestamp = useTimestamp;
}
@@ -501,7 +501,7 @@ public final class Libraries extends Task {
//record the fact in the library
log("success; marking as fetched",
Project.MSG_DEBUG);
- library._setFetched(fetched);
+ library.assignFetched(fetched);
} catch (IOException e) {
log(ERROR_LIBRARY_FETCH_FAILED + library);
log(e.getMessage());
@@ -540,7 +540,7 @@ public final class Libraries extends Task {
Iterator it = libraryIterator();
while (it.hasNext()) {
Library library = (Library) it.next();
- library._setToFetch(fetch);
+ library.assignToFetch(fetch);
}
}
@@ -553,7 +553,7 @@ public final class Libraries extends Task {
Iterator it = libraryIterator();
while (it.hasNext()) {
Library library = (Library) it.next();
- library._setToFetch(!library.exists());
+ library.assignToFetch(!library.exists());
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/repository/Library.java b/src/main/org/apache/tools/ant/taskdefs/repository/Library.java
index b634f5220..6ddc2c126 100644
--- a/src/main/org/apache/tools/ant/taskdefs/repository/Library.java
+++ b/src/main/org/apache/tools/ant/taskdefs/repository/Library.java
@@ -193,7 +193,7 @@ public class Library implements EnabledLibraryElement {
* set the library file. Hidden from Ant users.
* @param file
*/
- public void _setLibraryFile(File file) {
+ public void assignLibraryFile(File file) {
this.libraryFile = file;
}
@@ -330,10 +330,10 @@ public class Library implements EnabledLibraryElement {
/**
* prefixed to avoid ant picking up on it, this sets
* the fetch/no-fetch flag.
- * @param toFetch
+ * @param toFetchFlag
*/
- public void _setToFetch(boolean toFetch) {
- this.toFetch = toFetch;
+ public void assignToFetch(boolean toFetchFlag) {
+ this.toFetch = toFetchFlag;
}
/**
@@ -355,10 +355,10 @@ public class Library implements EnabledLibraryElement {
/**
* another not-for-end-users attribute; a flag set to true if the
* library has been fetched.
- * @param fetched
+ * @param fetchflag
*/
- public void _setFetched(boolean fetched) {
- this.fetched = fetched;
+ public void assignFetched(boolean fetchflag) {
+ this.fetched = fetchflag;
}
/**
diff --git a/src/main/org/apache/tools/ant/taskdefs/repository/TimestampPolicy.java b/src/main/org/apache/tools/ant/taskdefs/repository/TimestampPolicy.java
index d87467822..e59668037 100644
--- a/src/main/org/apache/tools/ant/taskdefs/repository/TimestampPolicy.java
+++ b/src/main/org/apache/tools/ant/taskdefs/repository/TimestampPolicy.java
@@ -38,7 +38,7 @@ public class TimestampPolicy extends BaseLibraryPolicy {
*/
public boolean beforeConnect(Libraries owner, ListIterator libraries) {
owner.markAllLibrariesForFetch(true);
- owner._setUseTimestamp(true);
+ owner.setUseTimestamp(true);
return true;
}