Skip to content

Commit fdd67ac

Browse files
committed
chore: format oops
1 parent c0bf25b commit fdd67ac

4 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎bin/api-server/src/main/java/net/hollowcube/apiserver/session/SessionServiceImpl.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@ public int onlinePlayers() {
2323
@Override
2424
public @Nullable GameServer findHub(@Nullable String exclude) {
2525
var hub = db.servers.findHub(exclude);
26-
return hub == null ? null : new GameServer(hub.id(), hub.clusterIp(), hub.protocolVersion());
26+
return hub == null
27+
? null
28+
: new GameServer(hub.id(), hub.clusterIp(), hub.protocolVersion());
2729
}
2830

2931
@Override
3032
public @Nullable GameServer findServer(String id) {
3133
var server = db.servers.findServer(id);
32-
return server == null ? null : new GameServer(server.id(), server.clusterIp(), server.protocolVersion());
34+
return server == null
35+
? null
36+
: new GameServer(server.id(), server.clusterIp(), server.protocolVersion());
3337
}
3438
}

‎bin/api-server/src/test/java/net/hollowcube/apiserver/session/SessionServiceImplTest.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ insert into server_states (id, role, status, cluster_ip, protocol_version) value
9898
('isolate-b', 'map-isolate', 0, '', 0)"""
9999
);
100100

101-
assertEquals(new GameServer("isolate-a", "10.0.0.4", 777), sessions.findServer("isolate-a"));
101+
assertEquals(
102+
new GameServer("isolate-a", "10.0.0.4", 777),
103+
sessions.findServer("isolate-a")
104+
);
102105
assertNull(sessions.findServer("isolate-b"));
103106
assertNull(sessions.findServer("isolate-c"));
104107
}

‎modules/api/src/main/java/net/hollowcube/apiserver/s3/HttpS3Client.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ private <T> HttpResponse<T> send(
367367
boolean repeatable
368368
) {
369369
var backoff = FIRST_BACKOFF;
370-
for (var attempt = 1; ; attempt++) {
370+
for (var attempt = 1;; attempt++) {
371371
var last = !repeatable || attempt == MAX_ATTEMPTS;
372372
var span = tracer.spanBuilder("s3/" + operation)
373373
.setSpanKind(SpanKind.CLIENT)

‎modules/ipc/src/main/java/net/hollowcube/ipc/session/GameServer.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
///
55
/// @param id the pod name
66
/// @param protocolVersion what the server speaks, or 0 when the tracker has not learned it yet
7-
public record GameServer(String id, String clusterIp, int protocolVersion) {
8-
}
7+
public record GameServer(String id, String clusterIp, int protocolVersion) {}

0 commit comments

Comments
 (0)