Style: apply spotless
This commit is contained in:
+9
-12
@@ -11,13 +11,9 @@ import java.util.Optional;
|
|||||||
/**
|
/**
|
||||||
* Handler for the `GET_LOBBY_STATUS` command.
|
* Handler for the `GET_LOBBY_STATUS` command.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>Resolves the target lobby either by the optional `ID` parameter or by `USERNAME`. If both are
|
||||||
* Resolves the target lobby either by the optional `ID` parameter or by
|
* omitted the handler requires the session to be associated with a logged-in user (see the inline
|
||||||
* `USERNAME`. If both are
|
* pre-execution check). On success a {@link GetLobbyStatusResponse} is dispatched, otherwise an
|
||||||
* omitted the handler requires the session to be associated with a logged-in
|
|
||||||
* user (see the inline
|
|
||||||
* pre-execution check). On success a {@link GetLobbyStatusResponse} is
|
|
||||||
* dispatched, otherwise an
|
|
||||||
* {@link ErrorResponse} with code `LOBBY_NOT_FOUND` is sent.
|
* {@link ErrorResponse} with code `LOBBY_NOT_FOUND` is sent.
|
||||||
*/
|
*/
|
||||||
public class GetLobbyStatusHandler extends CommandHandler<GetLobbyStatusRequest> {
|
public class GetLobbyStatusHandler extends CommandHandler<GetLobbyStatusRequest> {
|
||||||
@@ -67,11 +63,12 @@ public class GetLobbyStatusHandler extends CommandHandler<GetLobbyStatusRequest>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var lobby = (request.getId() != null)
|
var lobby =
|
||||||
? lobbyManager.getLobby(LobbyId.of(request.getId()))
|
(request.getId() != null)
|
||||||
: (targetUsername != null
|
? lobbyManager.getLobby(LobbyId.of(request.getId()))
|
||||||
? lobbyManager.getLobbyByUsername(targetUsername)
|
: (targetUsername != null
|
||||||
: null);
|
? lobbyManager.getLobbyByUsername(targetUsername)
|
||||||
|
: null);
|
||||||
|
|
||||||
if (lobby == null) {
|
if (lobby == null) {
|
||||||
responseDispatcher.dispatch(
|
responseDispatcher.dispatch(
|
||||||
|
|||||||
Reference in New Issue
Block a user