Skip to content

Commit

Permalink
remove the collector
Browse files Browse the repository at this point in the history
  • Loading branch information
sankarcheppali committed Aug 26, 2023
1 parent d71e016 commit 88ae7e2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/redis/clients/jedis/JedisPubSubBase.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package redis.clients.jedis;

import static java.util.stream.Collectors.*;
import static redis.clients.jedis.Protocol.ResponseKeyword.*;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import redis.clients.jedis.Protocol.Command;
import redis.clients.jedis.exceptions.JedisException;
Expand Down Expand Up @@ -138,8 +136,7 @@ private void process() {
final T enchannel = (bchannel == null) ? null : encode(bchannel);
final Object bmesg = listReply.get(2);
if (bmesg instanceof List) {
final List<T> enmesgs = ((List<byte[]>) bmesg).stream().map(this::encode).collect(toList());
enmesgs.forEach(msg -> onMessage(enchannel, msg));
((List<byte[]>) bmesg).stream().map(this::encode).forEach(msg -> onMessage(enchannel, msg));
} else {
final T enmesg = (bmesg == null) ? null : encode((byte[]) bmesg);
onMessage(enchannel, enmesg);
Expand Down

0 comments on commit 88ae7e2

Please sign in to comment.