Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void handle(TimestampedChange timestampedChange, MachineEvent event) {
var timeRange = TimeUtil.getTimeRange(event.getCreatedAt());
final Withdrawal withdrawalOld =
Optional.ofNullable(withdrawalDao.get(withdrawalId, timeRange.getLeft(), timeRange.getRight()))
.orElse(withdrawalDao.get(withdrawalId));
.orElseGet(() -> withdrawalDao.get(withdrawalId));
Withdrawal withdrawalNew = machineEventCopyFactory
.create(event, sequenceId, withdrawalId, withdrawalOld, timestampedChange.getOccuredAt());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void handle(TimestampedChange timestampedChange, MachineEvent event) {
var timeRange = TimeUtil.getTimeRange(event.getCreatedAt());
final Withdrawal withdrawalOld =
Optional.ofNullable(withdrawalDao.get(withdrawalId, timeRange.getLeft(), timeRange.getRight()))
.orElse(withdrawalDao.get(withdrawalId));
.orElseGet(() -> withdrawalDao.get(withdrawalId));
Withdrawal withdrawalNew = machineEventCopyFactory
.create(event, sequenceId, withdrawalId, withdrawalOld, timestampedChange.getOccuredAt());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void handle(TimestampedChange timestampedChange, MachineEvent event) {
var timeRange = TimeUtil.getTimeRange(event.getCreatedAt());
final Withdrawal withdrawalOld =
Optional.ofNullable(withdrawalDao.get(withdrawalId, timeRange.getLeft(), timeRange.getRight()))
.orElse(withdrawalDao.get(withdrawalId));
.orElseGet(() -> withdrawalDao.get(withdrawalId));
Withdrawal withdrawalNew = machineEventCopyFactory
.create(event, sequenceId, withdrawalId, withdrawalOld, timestampedChange.getOccuredAt());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void handle(TimestampedChange timestampedChange, MachineEvent event) {
var timeRange = TimeUtil.getTimeRange(event.getCreatedAt());
final Withdrawal withdrawalOld =
Optional.ofNullable(withdrawalDao.get(withdrawalId, timeRange.getLeft(), timeRange.getRight()))
.orElse(withdrawalDao.get(withdrawalId));
.orElseGet(() -> withdrawalDao.get(withdrawalId));
Withdrawal withdrawalNew = machineEventCopyFactory
.create(event, sequenceId, withdrawalId, withdrawalOld, timestampedChange.getOccuredAt());
withdrawalNew.setWithdrawalTransferStatus(TBaseUtil.unionFieldToEnum(status, WithdrawalTransferStatus.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void handle(TimestampedChange timestampedChange, MachineEvent event) {
var timeRange = TimeUtil.getTimeRange(event.getCreatedAt());
final WithdrawalSession withdrawalSessionOld = Optional
.ofNullable(withdrawalSessionDao.get(withdrawalSessionId, timeRange.getLeft(), timeRange.getRight()))
.orElse(withdrawalSessionDao.get(withdrawalSessionId));
.orElseGet(() -> withdrawalSessionDao.get(withdrawalSessionId));
WithdrawalSession withdrawalSessionNew = withdrawalSessionMachineEventCopyFactory
.create(event, sequenceId, withdrawalSessionId, withdrawalSessionOld, timestampedChange.getOccuredAt());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void handle(TimestampedChange timestampedChange, MachineEvent event) {
var timeRange = TimeUtil.getTimeRange(event.getCreatedAt());
final WithdrawalSession withdrawalSessionOld = Optional
.ofNullable(withdrawalSessionDao.get(withdrawalSessionId, timeRange.getLeft(), timeRange.getRight()))
.orElse(withdrawalSessionDao.get(withdrawalSessionId));
.orElseGet(() -> withdrawalSessionDao.get(withdrawalSessionId));
WithdrawalSession withdrawalSessionNew = withdrawalSessionMachineEventCopyFactory
.create(event, sequenceId, withdrawalSessionId, withdrawalSessionOld, timestampedChange.getOccuredAt());
withdrawalSessionNew.setAdapterState(JsonUtil.thriftBaseToJsonString(change.getNextState()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void handle(TimestampedChange timestampedChange, MachineEvent event) {
var timeRange = TimeUtil.getTimeRange(event.getCreatedAt());
final WithdrawalSession withdrawalSessionOld = Optional
.ofNullable(withdrawalSessionDao.get(withdrawalSessionId, timeRange.getLeft(), timeRange.getRight()))
.orElse(withdrawalSessionDao.get(withdrawalSessionId));
.orElseGet(() -> withdrawalSessionDao.get(withdrawalSessionId));
WithdrawalSession withdrawalSessionNew = withdrawalSessionMachineEventCopyFactory
.create(event, sequenceId, withdrawalSessionId, withdrawalSessionOld, timestampedChange.getOccuredAt());

Expand Down
Loading