You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2022/09/13 12:48:11 UTC

[GitHub] [fineract] galovics commented on a diff in pull request #2588: FINERACT-1738: Introduce Lombok to codes module

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: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org