Location nextLocation = goToNextLocation(currentBatch, Location.ANY_RECORD_TYPE, true);
long expectedChecksum = currentBatchBuffer.getLong();
checksummedLocations.clear();
while (nextLocation != null && nextLocation.getType() != Location.BATCH_CONTROL_RECORD_TYPE) {
byte data[] = accessor.readLocation(nextLocation, false);
actualChecksum.update(data, 0, data.length);
checksummedLocations.add(nextLocation);
nextLocation = goToNextLocation(nextLocation, Location.ANY_RECORD_TYPE, true);
}
if (expectedChecksum != actualChecksum.getValue()) {
recoveryErrorHandler.onError(this, checksummedLocations);