Skip to content

Commit

Permalink
🔗 :: (#574) 버그 제보 시 이미지가 null이면 NPE 발생
Browse files Browse the repository at this point in the history
  • Loading branch information
alsdl0629 authored Mar 10, 2024
2 parents 55a480e + 233bfce commit 0543e5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
Expand All @@ -14,7 +13,6 @@
@Embeddable
public class BugAttachmentEntity {

@NotNull
@Column(columnDefinition = "VARCHAR(300)")
private String attachmentUrl;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import team.retum.jobis.domain.bug.dto.request.CreateBugReportRequest;
import team.retum.jobis.domain.bug.model.DevelopmentArea;

import java.util.Collections;
import java.util.List;
import java.util.Objects;

@Getter
@NoArgsConstructor
Expand All @@ -32,7 +34,7 @@ public CreateBugReportRequest toDomainRequest() {
.title(this.title)
.content(this.content)
.developmentArea(this.developmentArea)
.attachmentUrls(this.attachmentUrls)
.attachmentUrls(Objects.requireNonNullElse(attachmentUrls, Collections.emptyList()))
.build();
}
}

0 comments on commit 0543e5f

Please sign in to comment.