Skip to content

Commit

Permalink
Apply Google Java Style Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiser-Yang authored and github-actions[bot] committed Sep 16, 2024
1 parent 965a19e commit 81a94ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public ResponseEntity<ErrorVO> handleGenericException(
}

@ExceptionHandler(JsonParseException.class)
public ResponseEntity<ErrorVO> handleJsonParseException(JsonParseException e, HttpServletRequest request) {
public ResponseEntity<ErrorVO> handleJsonParseException(
JsonParseException e, HttpServletRequest request) {
GenericException exception = new GenericException(e.getMessage());
exception.setCode(ErrorCodeEnum.MESSAGE_CONVERSION_ERROR);
return handleGenericException(exception, request);
Expand Down
10 changes: 2 additions & 8 deletions src/main/java/edu/cmipt/gcs/filter/JwtFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,7 @@ private void authorize(HttpServletRequest request, String accessToken, String re
String idInBody = getFromRequestBody(request, "id");
if (request.getRequestURI().startsWith(ApiPathConstant.USER_API_PREFIX)
&& !idInToken.equals(idInBody)) {
logger.info(
"User[{}] tried to update user[{}]",
idInToken,
idInBody);
logger.info("User[{}] tried to update user[{}]", idInToken, idInBody);
throw new GenericException(ErrorCodeEnum.ACCESS_DENIED);
}
} else if (request.getRequestURI()
Expand All @@ -195,10 +192,7 @@ private void authorize(HttpServletRequest request, String accessToken, String re
String idInParam = request.getParameter("id");
if (request.getRequestURI().startsWith(ApiPathConstant.USER_API_PREFIX)
&& !idInToken.equals(idInParam)) {
logger.info(
"User[{}] tried to delete user[{}]",
idInToken,
idInParam);
logger.info("User[{}] tried to delete user[{}]", idInToken, idInParam);
throw new GenericException(ErrorCodeEnum.ACCESS_DENIED);
}
} else {
Expand Down

0 comments on commit 81a94ea

Please sign in to comment.