Fixed end iteration criteria

This commit is contained in:
Alessia Bardi 2022-04-19 17:03:54 +02:00
parent 48b135190e
commit fcdec764f1
1 changed files with 2 additions and 2 deletions

View File

@ -40,13 +40,13 @@ public class ThanadosIterator extends ThreadSafeIterator {
@Override
public boolean doHasNext() {
return counter <= this.identifiers.size();
return counter < this.identifiers.size();
}
@Override
public String doNext() {
try {
if (counter <= this.identifiers.size()) {
if (counter < this.identifiers.size()) {
String toDownload = String.format(urlFormat, baseUrl, identifiers.get(counter));
log.debug("Downloading "+toDownload);
System.out.println("Downloading "+toDownload);