Skip to content

Commit

Permalink
refactor: Post의 lastModifier가 null인 경우 예외 처리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchef1 committed May 21, 2024
1 parent c7b6624 commit 6ce4a24
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public Post(String title, String content, String lastModifier, PostStatus status
this.status = status;
}

public String getLastModifier() {
return lastModifier != null ? lastModifier : "Unknown";
}

public void update(String content, String lastModifier) {
this.content = content;
this.lastModifier = lastModifier;
Expand Down

0 comments on commit 6ce4a24

Please sign in to comment.