abraham-menyhart commented on code in PR #3411:
URL: https://github.com/apache/fineract/pull/3411#discussion_r1321592966
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java:
##########
@@ -1662,10 +1664,10 @@ public void modifyApplication(final JsonCommand
command, final Map<String, Objec
this.accountNumber = StringUtils.defaultIfEmpty(newValue, null);
}
- if
(command.isChangeInStringParameterNamed(SavingsApiConstants.externalIdParamName,
this.externalId)) {
+ if
(command.isChangeInStringParameterNamed(SavingsApiConstants.externalIdParamName,
this.externalId.getValue())) {
final String newValue =
command.stringValueOfParameterNamed(SavingsApiConstants.externalIdParamName);
actualChanges.put(SavingsApiConstants.externalIdParamName,
newValue);
- this.externalId = StringUtils.defaultIfEmpty(newValue, null);
+ this.externalId = ExternalIdFactory.produce(newValue);
Review Comment:
Since it is an Entity class, and the create method is not static, I should
pass the `ExternalIdFactory` dependency as a method parameter, etc. So it won't
be very pretty I think. Is it a business requirement? In the other cases, I'll
implement your change request, only this case I'm a bit hesitant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]