FileInputStream fileInputStream = null;
try {
fileInputStream = new FileInputStream(file);
final Person person = AccessControl.getPerson();
final SibsIncommingPaymentFile sibsFile = SibsIncommingPaymentFile.parse(file.getName(), fileInputStream);
result.addMessage("label.manager.SIBS.linesFound", String.valueOf(sibsFile.getDetailLines().size()));
result.addMessage("label.manager.SIBS.startingProcess");
for (final SibsIncommingPaymentFileDetailLine detailLine : sibsFile.getDetailLines()) {
try {
processCode(detailLine, person, result);
} catch (Exception e) {
result.addError("error.manager.SIBS.processException", detailLine.getCode(), getMessage(e));
}
}
result.addMessage("label.manager.SIBS.creatingReport");
if (!result.hasFailed()) {
if (SibsPaymentFileProcessReport.hasAny(sibsFile.getWhenProcessedBySibs(), sibsFile.getVersion())) {
result.addMessage("warning.manager.SIBS.reportAlreadyProcessed");
} else {
try {
createSibsFileReport(sibsFile, result);
} catch (Exception ex) {