commit for FINERACT-52 (Null value not handled in 'ClientWritePlatformServiceJpaRepositoryImpl.CloseClient' date comparison)
This commit is contained in:
+1
-1
@@ -631,7 +631,7 @@ public class ClientWritePlatformServiceJpaRepositoryImpl implements ClientWriteP
|
|||||||
throw new InvalidClientStateTransitionException("close", "is.under.transfer", errorMessage);
|
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.";
|
final String errorMessage = "The client closureDate cannot be before the client ActivationDate.";
|
||||||
throw new InvalidClientStateTransitionException("close", "date.cannot.before.client.actvation.date", errorMessage,
|
throw new InvalidClientStateTransitionException("close", "date.cannot.before.client.actvation.date", errorMessage,
|
||||||
closureDate, client.getActivationLocalDate());
|
closureDate, client.getActivationLocalDate());
|
||||||
|
|||||||
Reference in New Issue
Block a user