FIX
authorKai Moritz <kai@juplo.de>
Fri, 15 Sep 2023 18:58:52 +0000 (20:58 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 15 Sep 2023 19:14:40 +0000 (21:14 +0200)
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java

index e42ea9f..de68194 100644 (file)
@@ -299,16 +299,15 @@ public class DataChannel implements Runnable, ConsumerRebalanceListener
     return infoChannel
         .getChatRoomInfo(id)
         .map(chatRoomInfo ->
-        {
-          if (chatRoomInfo == null) return null;
-          return chatRoomData[shard].computeIfAbsent(
-              id,
-              (chatRoomId) ->
-              {
-                log.info("Creating ChatRoom {} with buffer-size {}", chatRoomId, bufferSize);
-                KafkaChatMessageService service = new KafkaChatMessageService(this, chatRoomId);
-                return new ChatRoomData(clock, service, bufferSize);
-              });
-        });
+          chatRoomInfo == null
+              ? null
+              : chatRoomData[shard].computeIfAbsent(
+                  id,
+                  (chatRoomId) ->
+                  {
+                    log.info("Creating ChatRoom {} with buffer-size {}", chatRoomId, bufferSize);
+                    KafkaChatMessageService service = new KafkaChatMessageService(this, chatRoomId);
+                    return new ChatRoomData(clock, service, bufferSize);
+                  }));
   }
 }