Browse Source

<get>'s retries attribute has a misleading name

https://bz.apache.org/bugzilla/show_bug.cgi?id=59930
master
Stefan Bodewig 8 years ago
parent
commit
0c4f5b1b62
3 changed files with 18 additions and 3 deletions
  1. +3
    -0
      WHATSNEW
  2. +4
    -1
      manual/Tasks/get.html
  3. +11
    -2
      src/main/org/apache/tools/ant/taskdefs/Get.java

+ 3
- 0
WHATSNEW View File

@@ -49,6 +49,9 @@ Fixed bugs:
of the expected format. of the expected format.
Bugzilla Report 59909 Bugzilla Report 59909


* Clarified the documentation of <get>'s retries attribute.
Bugzilla Report 59930

Other changes: Other changes:
-------------- --------------




+ 4
- 1
manual/Tasks/get.html View File

@@ -107,7 +107,10 @@ plain text' authentication is used. This is only secure over an HTTPS link.
</tr> </tr>
<tr> <tr>
<td valign="top">retries</td> <td valign="top">retries</td>
<td valign="top">the per download number of retries on error<br/>
<td valign="top">The number of attempts to make for opening the URI.<br/>
The name of the attribute is misleading as a value of 1 means
"don't retry on error" and a value of 0 meant don't even try to
reach the URI at all.<br/>
<em>since Ant 1.8.0</em></td> <em>since Ant 1.8.0</em></td>
<td align="center" valign="top">No; default "3"</td> <td align="center" valign="top">No; default "3"</td>
</tr> </tr>


+ 11
- 2
src/main/org/apache/tools/ant/taskdefs/Get.java View File

@@ -413,13 +413,22 @@ public class Get extends Task {
} }


/** /**
* The number of retries to attempt upon error, defaults to 3.
* The number of attempts to make for opening the URI, defaults to 3.
* *
* @param r retry count
* <p>The name of the method is misleading as a value of 1 means
* "don't retry on error" and a value of 0 meant don't even try to
* reach the URI at all.</p>
*
* @param r number of attempts to make
* *
* @since Ant 1.8.0 * @since Ant 1.8.0
*/ */
public void setRetries(final int r) { public void setRetries(final int r) {
if (r <= 0) {
log("Setting retries to " + r
+ " will make the task not even try to reach the URI at all",
Project.MSG_WARN);
}
this.numberRetries = r; this.numberRetries = r;
} }




Loading…
Cancel
Save