FIX rebase--2023-09-15--21-27
authorKai Moritz <kai@juplo.de>
Fri, 15 Sep 2023 19:27:20 +0000 (21:27 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 15 Sep 2023 19:27:20 +0000 (21:27 +0200)
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java

index de68194..d2d6f30 100644 (file)
@@ -298,16 +298,13 @@ public class DataChannel implements Runnable, ConsumerRebalanceListener
 
     return infoChannel
         .getChatRoomInfo(id)
-        .map(chatRoomInfo ->
-          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);
-                  }));
+        .map(chatRoomInfo -> 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);
+            }));
   }
 }