Skip to content

Commit 390b8e6

Browse files
author
github-actions
committed
chore: Java 스타일 수정
1 parent 124e8a9 commit 390b8e6

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

backend/src/main/java/io/f1/backend/domain/game/app/RoomService.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,18 @@
3333
import io.f1.backend.domain.quiz.entity.Quiz;
3434
import io.f1.backend.global.exception.CustomException;
3535
import io.f1.backend.global.exception.errorcode.RoomErrorCode;
36+
37+
import lombok.RequiredArgsConstructor;
38+
import lombok.extern.slf4j.Slf4j;
39+
40+
import org.springframework.context.ApplicationEventPublisher;
41+
import org.springframework.stereotype.Service;
42+
3643
import java.util.List;
3744
import java.util.Map;
3845
import java.util.Optional;
3946
import java.util.concurrent.ConcurrentHashMap;
4047
import java.util.concurrent.atomic.AtomicLong;
41-
import lombok.RequiredArgsConstructor;
42-
import lombok.extern.slf4j.Slf4j;
43-
import org.springframework.context.ApplicationEventPublisher;
44-
import org.springframework.stereotype.Service;
4548

4649
@Slf4j
4750
@Service
@@ -242,8 +245,7 @@ private void changeHost(Room room, String hostSessionId) {
242245
Player nextHost =
243246
playerSessionMap.get(
244247
nextHostSessionId.orElseThrow(
245-
() ->
246-
new CustomException(RoomErrorCode.SOCKET_SESSION_NOT_FOUND)));
248+
() -> new CustomException(RoomErrorCode.SOCKET_SESSION_NOT_FOUND)));
247249

248250
room.updateHost(nextHost);
249251
log.info("user_id:{} 방장 변경 완료 ", nextHost.getId());

backend/src/main/java/io/f1/backend/global/config/StompChannelInterceptor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ public Message<?> preSend(Message<?> message, MessageChannel channel) {
2727
throw new IllegalArgumentException("Stomp command required");
2828
}
2929

30-
if(command.equals(StompCommand.CONNECT)) {
30+
if (command.equals(StompCommand.CONNECT)) {
3131
log.info("CONNECT : 세션 연결 - sessionId = {}", sessionId);
32-
}else if(command.equals(StompCommand.SUBSCRIBE)) {
32+
} else if (command.equals(StompCommand.SUBSCRIBE)) {
3333
if (destination != null && sessionId != null) {
3434
log.info("SUBSCRIBE : 구독 시작 destination = {}", destination);
3535
}
36-
}else if(command.equals(StompCommand.SEND)) {
36+
} else if (command.equals(StompCommand.SEND)) {
3737
log.info("SEND : 요청 destination = {}", destination);
38-
}else if(command.equals(StompCommand.DISCONNECT)) {
38+
} else if (command.equals(StompCommand.DISCONNECT)) {
3939
log.info("DISCONNECT : 연결 해제 sessionId = {}", sessionId);
4040
}
4141

backend/src/main/java/io/f1/backend/global/exception/errorcode/RoomErrorCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public enum RoomErrorCode implements ErrorCode {
1212
ROOM_GAME_IN_PROGRESS("E403003", HttpStatus.FORBIDDEN, "게임이 진행 중 입니다."),
1313
ROOM_NOT_FOUND("E404005", HttpStatus.NOT_FOUND, "존재하지 않는 방입니다."),
1414
WRONG_PASSWORD("E401006", HttpStatus.UNAUTHORIZED, "비밀번호가 일치하지않습니다."),
15-
SOCKET_SESSION_NOT_FOUND("E404006",HttpStatus.NOT_FOUND,"존재하지 않는 소켓 세션입니다.");
15+
SOCKET_SESSION_NOT_FOUND("E404006", HttpStatus.NOT_FOUND, "존재하지 않는 소켓 세션입니다.");
1616

1717
private final String code;
1818

0 commit comments

Comments
 (0)