This commit is contained in:
ialbert 2023-05-31 16:09:40 +03:00
parent 37bc4b72cd
commit 15d950bee8

View file

@ -204,9 +204,9 @@ public class RequirementsAndObligationCreation implements ISessionStage {
invalid = String.format("exchangeExecutionId %d and %d not equal", exec1.getExchangeExecutionId(), exec2.getExchangeExecutionId());
} else if (Objects.equals(getSide(exec1), getSide(exec2))) {
invalid = String.format("side %s and %s equal, must be opposite", getSide(exec1), getSide(exec1));
} else if (!Objects.equals(exec1.getCounterPartyId(), exec2.getCounterPartyId())) {
invalid = String.format("Execution#id(%d)#counterPartyId(%d), Execution#id(%d)#counterPartyId(%d)",
exec1.getId(), exec1.getCounterPartyId(), exec2.getId(), exec2.getCounterPartyId());
} else if (!Objects.equals(exec1.getCompanyId(), exec2.getCounterPartyId()) || !Objects.equals(exec1.getCounterPartyId(), exec2.getCompanyId())) {
invalid = String.format("Execution#id(%d)#companyId(%d)#counterPartyId(%d), Execution#id(%d)#companyId(%d)#counterPartyId(%d)",
exec1.getId(), exec1.getCompanyId(), exec1.getCounterPartyId(), exec2.getId(), exec2.getCompanyId(), exec2.getCounterPartyId());
}
if (invalid != null) {
log.error("FATAL couldn't match Execution#id({}) with Execution#id({}) error: {}", exec1.getId(), exec2.getId(), invalid);