Skip to content

Commit

Permalink
Only compare Teller and Cashier endDate if its not null
Browse files Browse the repository at this point in the history
  • Loading branch information
terencemo committed Feb 6, 2018
1 parent 8e7bd01 commit e13616b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ public void validateCashierAllowedDateAndTime(final Cashier cashier,
*/
if (fromDate.isBefore(tellerFromDate)
|| endDate.isBefore(tellerFromDate)
|| (tellerEndDate != null && fromDate.isAfter(tellerEndDate) || endDate
.isAfter(tellerEndDate))) {
|| (tellerEndDate != null &&
(fromDate.isAfter(tellerEndDate)
|| endDate.isAfter(tellerEndDate)))) {
throw new CashierDateRangeOutOfTellerDateRangeException();
}
/**
Expand Down

0 comments on commit e13616b

Please sign in to comment.