fix broken build due to small logging error detected by SpotBugs

significant reformatting due to Eclipse auto-save action (someone really
needs to finish the Checkstyle uniform formatting)

see https://github.com/apache/fineract/pull/592
This commit is contained in:
Michael Vorburger
2020-03-15 11:05:30 +01:00
committed by Michael Vorburger ⛑️
parent b9b265b915
commit b1eb62f221
@@ -48,8 +48,8 @@ import org.springframework.transaction.annotation.Transactional;
@Service @Service
public class RateWriteServiceImpl implements RateWriteService { public class RateWriteServiceImpl implements RateWriteService {
private final static Logger logger = LoggerFactory private final static Logger logger = LoggerFactory.getLogger(RateWriteServiceImpl.class);
.getLogger(RateWriteServiceImpl.class);
private final RateRepository rateRepository; private final RateRepository rateRepository;
private final AppUserRepository appUserRepository; private final AppUserRepository appUserRepository;
private final PlatformSecurityContext context; private final PlatformSecurityContext context;
@@ -125,13 +125,12 @@ public class RateWriteServiceImpl implements RateWriteService {
} catch (final DataIntegrityViolationException dve) { } catch (final DataIntegrityViolationException dve) {
handleRateDataIntegrityIssues(command, dve.getMostSpecificCause(), dve); handleRateDataIntegrityIssues(command, dve.getMostSpecificCause(), dve);
return new CommandProcessingResult(Long.valueOf(-1)); return new CommandProcessingResult((long) -1);
} catch (final PersistenceException dve) { } catch (final PersistenceException dve) {
Throwable throwable = ExceptionUtils.getRootCause(dve.getCause()); Throwable throwable = ExceptionUtils.getRootCause(dve.getCause());
handleRateDataIntegrityIssues(command, throwable, dve); handleRateDataIntegrityIssues(command, throwable, dve);
return CommandProcessingResult.empty(); return CommandProcessingResult.empty();
} }
} }
/* /*
@@ -147,9 +146,8 @@ public class RateWriteServiceImpl implements RateWriteService {
+ "' already exists", "name", name); + "' already exists", "name", name);
} }
logger.error(dve.getMessage(), dve); logger.error("Error due to Exception", dve);
throw new PlatformDataIntegrityException("error.msg.fund.unknown.data.integrity.issue", throw new PlatformDataIntegrityException("error.msg.fund.unknown.data.integrity.issue",
"Unknown data integrity issue with resource: " + realCause.getMessage()); "Unknown data integrity issue with resource: " + realCause.getMessage());
} }
} }