Merge pull request #176 from emmanuelnnaa/FINERACT-52

commit for FINERACT-52 (Null value not handled in 'ClientWritePlatformServiceJpaRepositoryImpl.CloseClient' date comparison)
This commit is contained in:
Vishwas Babu A J
2019-02-26 00:27:48 -08:00
committed by GitHub
@@ -713,7 +713,7 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP
throw new InvalidClientStateTransitionException("close", "is.under.transfer", errorMessage);
}
if (client.isNotPending() && client.getActivationLocalDate().isAfter(closureDate)) {
if (client.isNotPending() && client.getActivationLocalDate() != null && client.getActivationLocalDate().isAfter(closureDate)) {
final String errorMessage = "The client closureDate cannot be before the client ActivationDate.";
throw new InvalidClientStateTransitionException("close", "date.cannot.before.client.actvation.date", errorMessage,
closureDate, client.getActivationLocalDate());