- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
if (!policyIds.isEmpty()) {
AtomicInteger recordCount = new AtomicInteger(0); // <- WTF?!!!!
try {
for (final BigDecimal policyId : policyIds) {
helper.processPolicy(policyId.longValue(), /* ещё 7 параметров */ recordCount);
}
} catch (IOException e) {
// код обработки исключения опущен
}
saveToFile(ctx, fileName, outputStream.toByteArray(), recordCount);
}
// А вот что делает helper.processPolicy
if (selector.matches(policy)) {
if (processRequestImpl(policy, ctx, fileName, outputStream, ioService, outputDir, applicationContext)) {
recordCount.getAndAdd(1);
}
}