From ff716ca6f8992c77f32519f40e145f83e97d08cb Mon Sep 17 00:00:00 2001 From: jisu Date: Wed, 26 Jun 2024 17:33:18 +0900 Subject: [PATCH] refactor: modify updateFamilyName logic when familyName is null --- family/src/main/java/com/oing/domain/Family.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/family/src/main/java/com/oing/domain/Family.java b/family/src/main/java/com/oing/domain/Family.java index 75a9653f..cb5e1fa1 100644 --- a/family/src/main/java/com/oing/domain/Family.java +++ b/family/src/main/java/com/oing/domain/Family.java @@ -86,14 +86,11 @@ public void resetScore() { } public void updateFamilyName(String familyName, String loginFamilyId) { - if (familyName == null) { - this.familyName = null; - this.familyNameEditorId = null; - } else { + if (familyName != null) { validateFamilyName(familyName); - this.familyName = familyName; - this.familyNameEditorId = loginFamilyId; } + this.familyName = familyName; + this.familyNameEditorId = loginFamilyId; } private void validateFamilyName(String familyName) {