Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify the judgment that reads a response as empty to isEmpty method #3888

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading