Only compare Teller and Cashier endDate if its not null
This commit is contained in:
+3
-2
@@ -95,8 +95,9 @@ public class CashierTransactionDataValidator {
|
||||
*/
|
||||
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();
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user