diff --git a/src/main/java/redis/clients/jedis/util/RedisInputStream.java b/src/main/java/redis/clients/jedis/util/RedisInputStream.java index a0dad9d437..f7e320f164 100644 --- a/src/main/java/redis/clients/jedis/util/RedisInputStream.java +++ b/src/main/java/redis/clients/jedis/util/RedisInputStream.java @@ -14,6 +14,7 @@ import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; + import redis.clients.jedis.exceptions.JedisConnectionException; /** @@ -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."); }