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)
|
if (fromDate.isBefore(tellerFromDate)
|
||||||
|| endDate.isBefore(tellerFromDate)
|
|| endDate.isBefore(tellerFromDate)
|
||||||
|| (tellerEndDate != null && fromDate.isAfter(tellerEndDate) || endDate
|
|| (tellerEndDate != null &&
|
||||||
.isAfter(tellerEndDate))) {
|
(fromDate.isAfter(tellerEndDate)
|
||||||
|
|| endDate.isAfter(tellerEndDate)))) {
|
||||||
throw new CashierDateRangeOutOfTellerDateRangeException();
|
throw new CashierDateRangeOutOfTellerDateRangeException();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user