Revision 58428
Added by Andreas Czerniak almost 4 years ago
RestIterator.java | ||
---|---|---|
353 | 353 |
throw new IllegalStateException("collection failed: " + e.getMessage()); |
354 | 354 |
} |
355 | 355 |
|
356 |
if (resultTotal == -1) { |
|
357 |
resultTotal = Integer.parseInt(xprResultTotalPath.evaluate(resultNode)); |
|
358 |
if (resumptionType.toLowerCase().equals("page")) { resultTotal += 1; } // to correct the upper bound |
|
359 |
log.info("resultTotal was -1 is now: " + resultTotal); |
|
356 |
try { |
|
357 |
if (resultTotal == -1) { |
|
358 |
resultTotal = Integer.parseInt(xprResultTotalPath.evaluate(resultNode)); |
|
359 |
if (resumptionType.toLowerCase().equals("page")) { resultTotal += 1; } // to correct the upper bound |
|
360 |
log.info("resultTotal was -1 is now: " + resultTotal); |
|
360 | 361 |
} |
362 |
} catch(Exception e) { |
|
363 |
log.error(e); |
|
364 |
throw new IllegalStateException("downloadPage resultTotal couldn't parse: " + e.getMessage()); |
|
365 |
} |
|
361 | 366 |
log.info("resultTotal: " + resultTotal); |
362 | 367 |
log.info("resInt: " + resumptionInt); |
363 | 368 |
if (resumptionInt <= resultTotal) { |
Also available in: Unified diff
RestCollector plugin - new resumptionType: deep-cursor, exception added