Skip to content

Commit

Permalink
Modify the judgment that reads a response as empty to isEmpty method (#…
Browse files Browse the repository at this point in the history
…3888)

Co-authored-by: zhangshuai <[email protected]>
  • Loading branch information
zyfx595701088 and zhangshuai authored Jul 16, 2024
1 parent e113b9c commit 773651c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/redis/clients/jedis/util/RedisInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;

import redis.clients.jedis.exceptions.JedisConnectionException;

/**
Expand Down Expand Up @@ -84,7 +85,7 @@ public String readLine() {
}

final String reply = sb.toString();
if (reply.length() == 0) {
if (reply.isEmpty()) {
throw new JedisConnectionException("It seems like server has closed the connection.");
}

Expand Down

0 comments on commit 773651c

Please sign in to comment.