galovics commented on code in PR #2588:
URL: https://github.com/apache/fineract/pull/2588#discussion_r969580792
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java:
##########
@@ -58,29 +66,8 @@ public class CodeValue extends AbstractPersistableCustom {
public static CodeValue createNew(final Code code, final String label,
final int position, final String description,
final boolean isActive, final boolean mandatory) {
- return new CodeValue(code, label, position, description, isActive,
mandatory);
- }
-
- protected CodeValue() {
- //
- }
-
- private CodeValue(final Code code, final String label, final int position,
final String description, final boolean isActive,
- final boolean mandatory) {
- this.code = code;
- this.label = StringUtils.defaultIfEmpty(label, null);
- this.position = position;
- this.description = description;
- this.isActive = isActive;
- this.mandatory = mandatory;
- }
-
- public String label() {
- return this.label;
- }
-
- public int position() {
- return this.position;
+ return new
CodeValue().setCode(code).setLabel(label).setPosition(position).setDescription(description).setActive(isActive)
Review Comment:
label should be assigned as `StringUtils.defaultIfEmpty(label, null)`
--
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]