Skip to content

Commit

Permalink
[refactor] Post의 lastModifier가 null인 경우 예외 처리 추가 #44
Browse files Browse the repository at this point in the history
[refactor] Post의 lastModifier가 null인 경우 예외 처리 추가
  • Loading branch information
yangchef1 authored May 21, 2024
2 parents c7b6624 + 6ce4a24 commit 4643c90
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 4643c90

Please sign in to comment.