Fixed end iteration criteria
This commit is contained in:
parent
48b135190e
commit
fcdec764f1
|
@ -40,13 +40,13 @@ public class ThanadosIterator extends ThreadSafeIterator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean doHasNext() {
|
public boolean doHasNext() {
|
||||||
return counter <= this.identifiers.size();
|
return counter < this.identifiers.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String doNext() {
|
public String doNext() {
|
||||||
try {
|
try {
|
||||||
if (counter <= this.identifiers.size()) {
|
if (counter < this.identifiers.size()) {
|
||||||
String toDownload = String.format(urlFormat, baseUrl, identifiers.get(counter));
|
String toDownload = String.format(urlFormat, baseUrl, identifiers.get(counter));
|
||||||
log.debug("Downloading "+toDownload);
|
log.debug("Downloading "+toDownload);
|
||||||
System.out.println("Downloading "+toDownload);
|
System.out.println("Downloading "+toDownload);
|
||||||
|
|
Loading…
Reference in New Issue