Skip to content

Commit 894dabe

Browse files
committed
fix : oldImageUrl이 빈 문자열("")일 때에도 정상적으로 예외 처리하도록 수정
1 parent a04cd12 commit 894dabe

File tree

1 file changed

+2
-1
lines changed
  • src/main/java/org/ezcode/codetest/application/usermanagement/user/service

1 file changed

+2
-1
lines changed

src/main/java/org/ezcode/codetest/application/usermanagement/user/service/UserService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.springframework.stereotype.Service;
3636

3737
import org.springframework.transaction.annotation.Transactional;
38+
import org.springframework.util.StringUtils;
3839
import org.springframework.web.multipart.MultipartFile;
3940

4041
import lombok.RequiredArgsConstructor;
@@ -107,7 +108,7 @@ public UserInfoResponse modifyUserInfo(AuthUser authUser, ModifyUserInfoRequest
107108

108109
user.modifyProfileImage(profileImageUrl);
109110

110-
if (oldImageUrl != null) {
111+
if (StringUtils.hasText(oldImageUrl)) {
111112
s3Uploader.delete(oldImageUrl, "profile");
112113
}
113114
}

0 commit comments

Comments
 (0)