From 504aa521f218ab44aa3e5973164b44658d4b2af5 Mon Sep 17 00:00:00 2001 From: JeongInJae <93825184+injae-348@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:09:57 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20Exception=20=EC=83=9D=EC=84=B1=EC=9E=90?= =?UTF-8?q?=20private=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20(#126)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Exception 생성자 public -> private 변경 * style: 한 칸 띄어쓰기 --- .../chatmessage/exception/LastChatMessageNotFoundException.java | 2 +- .../matching/exception/MatchingUnauthorizedAccessException.java | 2 +- .../exception/NotificationAccessDeniedException.java | 2 +- .../notification/exception/NotificationNotFoundException.java | 2 +- .../post/exception/PostDeleteNotAllowedException.java | 1 + .../java/econo/buddybridge/post/exception/PostErrorCode.java | 2 -- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/econo/buddybridge/chat/chatmessage/exception/LastChatMessageNotFoundException.java b/src/main/java/econo/buddybridge/chat/chatmessage/exception/LastChatMessageNotFoundException.java index d891368..8321753 100644 --- a/src/main/java/econo/buddybridge/chat/chatmessage/exception/LastChatMessageNotFoundException.java +++ b/src/main/java/econo/buddybridge/chat/chatmessage/exception/LastChatMessageNotFoundException.java @@ -6,5 +6,5 @@ public class LastChatMessageNotFoundException extends BusinessException { public static BusinessException EXCEPTION = new LastChatMessageNotFoundException(); - public LastChatMessageNotFoundException() { super(ChatMessageErrorCode.LAST_CHAT_MESSAGE_NOT_FOUND); } + private LastChatMessageNotFoundException() { super(ChatMessageErrorCode.LAST_CHAT_MESSAGE_NOT_FOUND); } } diff --git a/src/main/java/econo/buddybridge/matching/exception/MatchingUnauthorizedAccessException.java b/src/main/java/econo/buddybridge/matching/exception/MatchingUnauthorizedAccessException.java index 22b190b..ccf1dc0 100644 --- a/src/main/java/econo/buddybridge/matching/exception/MatchingUnauthorizedAccessException.java +++ b/src/main/java/econo/buddybridge/matching/exception/MatchingUnauthorizedAccessException.java @@ -6,5 +6,5 @@ public class MatchingUnauthorizedAccessException extends BusinessException { public static BusinessException EXCEPTION = new MatchingUnauthorizedAccessException(); - public MatchingUnauthorizedAccessException() { super(MatchingErrorCode.MATCHING_UNAUTHORIZED_ACCESS); } + private MatchingUnauthorizedAccessException() { super(MatchingErrorCode.MATCHING_UNAUTHORIZED_ACCESS); } } diff --git a/src/main/java/econo/buddybridge/notification/exception/NotificationAccessDeniedException.java b/src/main/java/econo/buddybridge/notification/exception/NotificationAccessDeniedException.java index 158b619..e95894f 100644 --- a/src/main/java/econo/buddybridge/notification/exception/NotificationAccessDeniedException.java +++ b/src/main/java/econo/buddybridge/notification/exception/NotificationAccessDeniedException.java @@ -6,7 +6,7 @@ public class NotificationAccessDeniedException extends BusinessException { public static BusinessException EXCEPTION = new NotificationAccessDeniedException(); - public NotificationAccessDeniedException() { + private NotificationAccessDeniedException() { super(NotificationErrorCode.NOTIFICATION_ACCESS_DENIED); } diff --git a/src/main/java/econo/buddybridge/notification/exception/NotificationNotFoundException.java b/src/main/java/econo/buddybridge/notification/exception/NotificationNotFoundException.java index 4c738be..a8fa51e 100644 --- a/src/main/java/econo/buddybridge/notification/exception/NotificationNotFoundException.java +++ b/src/main/java/econo/buddybridge/notification/exception/NotificationNotFoundException.java @@ -6,7 +6,7 @@ public class NotificationNotFoundException extends BusinessException { public static BusinessException EXCEPTION = new NotificationNotFoundException(); - public NotificationNotFoundException() { + private NotificationNotFoundException() { super(NotificationErrorCode.NOTIFICATION_NOT_FOUND); } diff --git a/src/main/java/econo/buddybridge/post/exception/PostDeleteNotAllowedException.java b/src/main/java/econo/buddybridge/post/exception/PostDeleteNotAllowedException.java index 9aff24e..498deb2 100644 --- a/src/main/java/econo/buddybridge/post/exception/PostDeleteNotAllowedException.java +++ b/src/main/java/econo/buddybridge/post/exception/PostDeleteNotAllowedException.java @@ -3,6 +3,7 @@ import econo.buddybridge.common.exception.BusinessException; public class PostDeleteNotAllowedException extends BusinessException { + public static BusinessException EXCEPTION = new PostDeleteNotAllowedException(); private PostDeleteNotAllowedException() { diff --git a/src/main/java/econo/buddybridge/post/exception/PostErrorCode.java b/src/main/java/econo/buddybridge/post/exception/PostErrorCode.java index ab734ab..7c76839 100644 --- a/src/main/java/econo/buddybridge/post/exception/PostErrorCode.java +++ b/src/main/java/econo/buddybridge/post/exception/PostErrorCode.java @@ -4,8 +4,6 @@ import org.springframework.http.HttpStatus; public enum PostErrorCode implements ErrorCode { - // TODO: Implement PostErrorCode - // EX) INVALID_INPUT_VALUE("P001", HttpStatus.BAD_REQUEST, "요청 값이 잘못되었습니다."), POST_NOT_FOUND("P001", HttpStatus.NOT_FOUND, "존재하지 않는 게시글입니다."), POST_DELETE_NOT_ALLOWED("P002", HttpStatus.FORBIDDEN, "본인의 게시글만 삭제할 수 있습니다."), POST_UPDATE_NOT_ALLOWED("P003", HttpStatus.FORBIDDEN, "본인의 게시글만 수정할 수 있습니다."),