поправил некоторые мелкие баги, найденные Sonar
This commit is contained in:
parent
c59d010444
commit
36ac6256d6
8 changed files with 14 additions and 3 deletions
|
|
@ -501,7 +501,7 @@ public class PaymentInstructionCreator {
|
||||||
Long lmId = liabilitiesClaimsAssets.getLiabilitiesClaimsMoneyId();
|
Long lmId = liabilitiesClaimsAssets.getLiabilitiesClaimsMoneyId();
|
||||||
log.debug("Update LiabilitiesClaimsMoney[{}] by paymentInstructions {}", lmId, paymentInstructions.stream().map(SpcexObjectBase::getId).collect(Collectors.toList()));
|
log.debug("Update LiabilitiesClaimsMoney[{}] by paymentInstructions {}", lmId, paymentInstructions.stream().map(SpcexObjectBase::getId).collect(Collectors.toList()));
|
||||||
LiabilitiesClaimsMoney liabilitiesClaimsMoney = liabilitiesClaimsMoneyImdg.getSingleObjectByID(lmId); // update data for update
|
LiabilitiesClaimsMoney liabilitiesClaimsMoney = liabilitiesClaimsMoneyImdg.getSingleObjectByID(lmId); // update data for update
|
||||||
if (liabilitiesClaimsAssets == null) {
|
if (liabilitiesClaimsMoney == null) {
|
||||||
throw new RuntimeException("IMDG not found LiabilitiesClaimsMoney.id=" + lmId);
|
throw new RuntimeException("IMDG not found LiabilitiesClaimsMoney.id=" + lmId);
|
||||||
}
|
}
|
||||||
if (!Objects.equals(liabilitiesClaimsMoney.getSettlementDate(), liabilitiesClaimsAssets.getSettlementDate())) {
|
if (!Objects.equals(liabilitiesClaimsMoney.getSettlementDate(), liabilitiesClaimsAssets.getSettlementDate())) {
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,9 @@ public abstract class AbstractHazelcastLifecycleSupport implements InitializingB
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
|
if (e instanceof InterruptedException) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
}
|
||||||
throw new RuntimeException("MapStore multithreaded not complete.", e);
|
throw new RuntimeException("MapStore multithreaded not complete.", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public abstract class AbstractReportCollector<T extends AbstractReport> {
|
||||||
*/
|
*/
|
||||||
protected String toString(Double val) {
|
protected String toString(Double val) {
|
||||||
if (val == null) return "";
|
if (val == null) return "";
|
||||||
return String.format(Locale.US, "%.2f", val.doubleValue());
|
return String.format(Locale.US, "%.2f", val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,6 @@ public class MoneyMarketSecurityService extends QueueConsumer implements Initial
|
||||||
}
|
}
|
||||||
MoneyMarketSecurity mms = validator.getStored(Stored.PresentById);
|
MoneyMarketSecurity mms = validator.getStored(Stored.PresentById);
|
||||||
mms.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey());
|
mms.setWorkflowStatus(ru.spcex.platform.enumeration.Status.Blocked.getKey());
|
||||||
Instant.now();
|
|
||||||
mms.setUpdated(Instant.now());
|
mms.setUpdated(Instant.now());
|
||||||
moneyMarketSecurityMap.update(mms);
|
moneyMarketSecurityMap.update(mms);
|
||||||
Listing listing = listingImdg.getSingleObjectByFieldValues(Map.of("securityId", mms.getId()));
|
Listing listing = listingImdg.getSingleObjectByFieldValues(Map.of("securityId", mms.getId()));
|
||||||
|
|
|
||||||
|
|
@ -262,6 +262,7 @@ public abstract class HazelcastServiceBase
|
||||||
lock.wait();
|
lock.wait();
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
log.error(ExceptionUtils.getStackTrace(e));
|
log.error(ExceptionUtils.getStackTrace(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,14 @@ public final class HazelcastHelper {
|
||||||
log.info("Hazelcast: TextErrorService done");
|
log.info("Hazelcast: TextErrorService done");
|
||||||
done = true;
|
done = true;
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
throw new RuntimeException("Thread interrupted when waiting storage ready.", e);
|
throw new RuntimeException("Thread interrupted when waiting storage ready.", e);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info(String.format("Waiting Hazelcast: %s -> %s", e.getClass().getSimpleName(), e.getMessage()));
|
log.info(String.format("Waiting Hazelcast: %s -> %s", e.getClass().getSimpleName(), e.getMessage()));
|
||||||
try {
|
try {
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
} catch (InterruptedException ignored) {
|
} catch (InterruptedException ignored) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
throw new RuntimeException("Thread interrupted.", e);
|
throw new RuntimeException("Thread interrupted.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,9 @@ public class QueueConsumer implements AutoCloseable {
|
||||||
send = producer.send(new ProducerRecord<>(Consts.REQUEST_INFO_UPDATE, req));
|
send = producer.send(new ProducerRecord<>(Consts.REQUEST_INFO_UPDATE, req));
|
||||||
send.get();
|
send.get();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
if (e instanceof InterruptedException) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
}
|
||||||
log.error(ExceptionUtils.getStackTrace(e));
|
log.error(ExceptionUtils.getStackTrace(e));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@ public class KafkaSender {
|
||||||
try {
|
try {
|
||||||
send.get();
|
send.get();
|
||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
|
if (e instanceof InterruptedException) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
}
|
||||||
log.error(ExceptionUtils.getStackTrace(e));
|
log.error(ExceptionUtils.getStackTrace(e));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue